Documentation
¶
Index ¶
- func WithAddr(addr string) tracerOption
- func WithComponent(component int32) spanOption
- func WithEndpoint(endpoint string) spanOption
- func WithExtractor(extractor func(headerKey string) (string, error)) spanOption
- func WithInjector(injector func(headerKey, headerValue string) error) spanOption
- func WithPeer(peer string) spanOption
- func WithSamplingRate(samplingRate float64) tracerOption
- func WithService(service string) tracerOption
- func WithSpanLayer(spanLayer SpanLayer) spanOption
- func WithTagMap(tagMap map[string]string) spanOption
- func WithTraceID(traceID string) spanOption
- type Span
- type SpanLayer
- type Tag
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithExtractor ¶
WithExtractor set extractor
func WithInjector ¶
WithInjector set injector
func WithSamplingRate ¶
func WithSamplingRate(samplingRate float64) tracerOption
WithSamplingRate set samplingRate
func WithSpanLayer ¶
func WithSpanLayer(spanLayer SpanLayer) spanOption
WithSpanLayer set span layer
Types ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
func (*Span) GetOperationName ¶
func (span *Span) GetOperationName()
type SpanLayer ¶
SpanLayer Map to the layer of span see https://github.com/apache/skywalking-goapi/blob/main/collect/language/agent/v3/Tracing.pb.go
const ( // SpanLayerUnknown Unknown layer. Could be anything. SpanLayerUnknown SpanLayer = 0 // SpanLayerDatabase A database layer, used in tracing the database client component. SpanLayerDatabase SpanLayer = 1 // SpanLayerRPCFramework A RPC layer, used in both client and server sides of RPC component. SpanLayerRPCFramework SpanLayer = 2 // SpanLayerHttp HTTP is a more specific RPCFramework. SpanLayerHttp SpanLayer = 3 // SpanLayerMQ A MQ layer, used in both producer and consumer sides of the MQ component. SpanLayerMQ SpanLayer = 4 // SpanLayerCache A cache layer, used in tracing the cache client component. SpanLayerCache SpanLayer = 5 // SpanLayerFAAS A FAASlayer, used in function-as-a-Service platform. SpanLayerFAAS SpanLayer = 6 )
type Tag ¶
Tag are supported by sky-walking engine. As default, all Tags will be stored, but these have particular meanings. see https://github.com/SkyAPM/go2sky/blob/master/span.go
const ( TagURL Tag = "url" TagStatusCode Tag = "status_code" TagHTTPMethod Tag = "http.method" TagDBType Tag = "db.type" TagDBInstance Tag = "db.instance" TagDBStatement Tag = "db.statement" TagDBSqlParameters Tag = "db.sql.parameters" TagMQQueue Tag = "mq.queue" TagMQBroker Tag = "mq.broker" TagMQTopic Tag = "mq.topic" )
