Documentation ¶
Overview ¶
Package propagation holds the required function signatures for Injection and Extraction. It also contains decoder and encoder of SkyWalking propagation protocol.
Index ¶
- Constants
- type Extractor
- type Injector
- type SpanContext
- func (tc *SpanContext) Decode(extractor Extractor) error
- func (tc *SpanContext) DecodeSW8(header string) error
- func (tc *SpanContext) DecodeSW8Correlation(header string) error
- func (tc *SpanContext) Encode(injector Injector) error
- func (tc *SpanContext) EncodeSW8() string
- func (tc *SpanContext) EncodeSW8Correlation() string
Constants ¶
const ( Header string = "sw8" HeaderCorrelation string = "sw8-correlation" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
Extractor is a tool specification which define how to extract trace parent context from propagation context
type Injector ¶
Injector is a tool specification which define how to inject trace context into propagation context
type SpanContext ¶
type SpanContext struct { TraceID string `json:"trace_id"` ParentSegmentID string `json:"parent_segment_id"` ParentService string `json:"parent_service"` ParentServiceInstance string `json:"parent_service_instance"` ParentEndpoint string `json:"parent_endpoint"` AddressUsedAtClient string `json:"address_used_at_client"` ParentSpanID int32 `json:"parent_span_id"` Sample int8 `json:"sample"` Valid bool `json:"valid"` CorrelationContext map[string]string `json:"correlation_context"` }
SpanContext defines propagation specification of SkyWalking
func (*SpanContext) Decode ¶ added in v1.0.0
func (tc *SpanContext) Decode(extractor Extractor) error
Decode all SpanContext data from Extractor
func (*SpanContext) DecodeSW8 ¶ added in v0.4.0
func (tc *SpanContext) DecodeSW8(header string) error
DecodeSW6 converts string header to SpanContext
func (*SpanContext) DecodeSW8Correlation ¶ added in v1.0.0
func (tc *SpanContext) DecodeSW8Correlation(header string) error
DecodeSW8Correlation converts correlation string header to SpanContext
func (*SpanContext) Encode ¶ added in v1.0.0
func (tc *SpanContext) Encode(injector Injector) error
Encode all SpanContext data to Injector
func (*SpanContext) EncodeSW8 ¶ added in v0.4.0
func (tc *SpanContext) EncodeSW8() string
EncodeSW6 converts SpanContext to string header
func (*SpanContext) EncodeSW8Correlation ¶ added in v1.0.0
func (tc *SpanContext) EncodeSW8Correlation() string
EncodeSW8Correlation converts correlation to string header