MCPcopy
hub / github.com/caddyserver/caddy / Tracing

Struct Tracing

modules/caddyhttp/tracing/module.go:25–37  ·  view source on GitHub ↗

Tracing implements an HTTP handler that adds support for distributed tracing, using OpenTelemetry. This module is responsible for the injection and propagation of the trace context. Configure this module via environment variables (see https://github.com/open-telemetry/opentelemetry-specification/blo

Source from the content-addressed store, hash-verified

23// variables (see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md).
24// Some values can be overwritten in the configuration file.
25type Tracing struct {
26 // SpanName is a span name. It should follow the naming guidelines here:
27 // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span
28 SpanName string `json:"span"`
29
30 // SpanAttributes are custom key-value pairs to be added to spans
31 SpanAttributes map[string]string `json:"span_attributes,omitempty"`
32
33 // otel implements opentelemetry related logic.
34 otel openTelemetryWrapper
35
36 logger *zap.Logger
37}
38
39// CaddyModule returns the Caddy module information.
40func (Tracing) CaddyModule() caddy.ModuleInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected