Documentation ¶
Index ¶
- func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler
- func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExporter, *sdktrace.TracerProvider, error)
- func SetupGlobalTraceProviderAndExporterForTest() (*tracetest.InMemoryExporter, *sdktrace.TracerProvider, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MuxServerMiddleware ¶
MuxServerMiddleware returns middleware that should be attached to a gorilla/mux server. It does two things: starts spans, and adds span/trace info to the request-specific logger. Right now we only support logging IDs in the format that Datadog expects.
func SetupGlobalTraceProviderAndExporter ¶
func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExporter, *sdktrace.TracerProvider, error)
SetupGlobalTraceProviderAndExporter sets up the global trace provider and exporter.
func SetupGlobalTraceProviderAndExporterForTest ¶
func SetupGlobalTraceProviderAndExporterForTest() (*tracetest.InMemoryExporter, *sdktrace.TracerProvider, error)
SetupGlobalTraceProviderAndExporterForTest is meant to be used in unit testing, and mirrors the setup above for outside of unit testing. It returns an in-memory exporter for examining generated spans.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.