Documentation ¶
Index ¶
- Variables
- func CompatibleExtractGrpcTraceID(header metadata.MD)
- func CompatibleExtractHTTPTraceID(header http.Header)
- func CompatibleParse(traceID string) string
- func CustomTag(key string, val string) attribute.KeyValue
- func ExtractTraceID(ctx context.Context) string
- func IsGlobalTracerRegistered() bool
- func SetGlobalTracer(tp trace.TracerProvider)
- type Option
- type Tracer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // String ... String = attribute.String )
Functions ¶
func CompatibleExtractGrpcTraceID ¶ added in v0.8.0
CompatibleExtractGrpcTraceID ... Deprecated 该方法会在v1.2.0移除
func CompatibleExtractHTTPTraceID ¶ added in v0.8.0
CompatibleExtractHTTPTraceID ... Deprecated 该方法会在v1.2.0移除
func CompatibleParse ¶ added in v0.8.0
CompatibleParse ... opentrace: 18af9db18a77f4b7:18af9db18a77f4b7:0000000000000000:0 opentelemetry: 00-18af9db18a77f4b718af9db18a77f4b7-18af9db18a77f4b7-00 https://www.w3.org/TR/trace-context/
func ExtractTraceID ¶ added in v0.3.6
ExtractTraceID HTTP使用request.Context,不要使用错了
func IsGlobalTracerRegistered ¶ added in v0.8.0
func IsGlobalTracerRegistered() bool
IsGlobalTracerRegistered returns a `bool` to indicate if a tracer has been globally registered
Types ¶
type Tracer ¶ added in v0.8.0
type Tracer struct {
// contains filtered or unexported fields
}
Tracer is otel span tracer
func (*Tracer) Start ¶ added in v0.8.0
func (t *Tracer) Start(ctx context.Context, operation string, carrier propagation.TextMapCarrier, opts ...trace.SpanStartOption) (context.Context, trace.Span)
Start start tracing span
Click to show internal directories.
Click to hide internal directories.