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 ¶
CompatibleExtractGrpcTraceID ... Deprecated 该方法会在v1.2.0移除
func CompatibleExtractHTTPTraceID ¶
CompatibleExtractHTTPTraceID ... Deprecated 该方法会在v1.2.0移除
func CompatibleParse ¶
CompatibleParse ... opentrace: 18af9db18a77f4b7:18af9db18a77f4b7:0000000000000000:0 opentelemetry: 00-18af9db18a77f4b718af9db18a77f4b7-18af9db18a77f4b7-00 https://www.w3.org/TR/trace-context/
func ExtractTraceID ¶
ExtractTraceID HTTP使用request.Context,不要使用错了
func IsGlobalTracerRegistered ¶
func IsGlobalTracerRegistered() bool
IsGlobalTracerRegistered returns a `bool` to indicate if a tracer has been globally registered
Types ¶
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer is otel span tracer
func (*Tracer) Start ¶
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.