Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware wraps a http.Handler so it's request uri is added to the trace.Span derived from the http.Request's context. This is a workaround for https://github.com/open-telemetry/opentelemetry-go/commit/7b749591320bfcdef2061f4d4f5aa533ab76b47f
func NewExporter ¶
func NewExporter(log accesslog.Logger) tracesdk.SpanExporter
NewExporter creates a new otel SpanExporter which, when added to an otel provider, sends accesslog.Details derived from trace.SpanKindServer spans, to the provided accesslog.Logger.
logger := accesslog.DefaultLogger(nil) tracer := tracesdk.NewTraceProvider( tracesdk.WithBatcher(otelaccesslog.NewExporter(logger)), )
func SetHandlerName ¶ added in v0.2.0
func WithHandlerName ¶
WithHandlerName adds name as value to the http.Request's context. It should be used on a per route/handler basis.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.