Documentation ¶
Index ¶
- func CreateTracerWriter(w rest.ResponseWriter, ctx context.Context, span oteltrace.Span, ...) *tracerResponseWriter
- func GetTraceHeaderFromJaeger(r *http.Request)
- func Init(serviceName string) *sdktrace.TracerProvider
- func SemVersion() string
- func Version() string
- type GetSpanNameFunc
- type Option
- type OtelMiddleware
- type OtelTracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTracerWriter ¶
func GetTraceHeaderFromJaeger ¶
GetTraceHeaderFromJaeger conver uber-trace-id header to traceparent here you can read more about those formats:
https://www.w3.org/TR/trace-context/#traceparent-header https://www.jaegertracing.io/docs/1.22/client-libraries/#key
func Init ¶
func Init(serviceName string) *sdktrace.TracerProvider
func SemVersion ¶
func SemVersion() string
SemVersion is the semantic version to be supplied to tracer/meter creation.
Types ¶
type GetSpanNameFunc ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies a configuration value.
func WithPropagators ¶
func WithPropagators(propagators propagation.TextMapPropagator) Option
WithPropagators specifies propagators to use for extracting information from the HTTP requests. If none are specified, global ones will be used.
func WithTracerProvider ¶
func WithTracerProvider(provider oteltrace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type OtelMiddleware ¶
OtelMiddleware sent trace to open telemetry collector
func (*OtelMiddleware) MiddlewareFunc ¶
func (mw *OtelMiddleware) MiddlewareFunc(h rest.HandlerFunc) rest.HandlerFunc
MiddlewareFunc makes OtelMiddleware implement the Middleware interface.
type OtelTracer ¶
type OtelTracer struct {
// contains filtered or unexported fields
}
func GetFunctionTracer ¶
func GetFunctionTracer() *OtelTracer
Click to show internal directories.
Click to hide internal directories.