propagation

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 19

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

View Source
const (
	Header string = "sw8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor func() (string, error)

Extractor is a tool specification which define how to extract trace parent context from propagation context

type Injector

type Injector func(header string) error

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"`
}

SpanContext defines propagation specification of SkyWalking

func (*SpanContext) DecodeSW8 added in v0.4.0

func (tc *SpanContext) DecodeSW8(header string) error

DecodeSW6 converts string header to SpanContext

func (*SpanContext) EncodeSW8 added in v0.4.0

func (tc *SpanContext) EncodeSW8() string

EncodeSW6 converts SpanContext to string header

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL