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
| 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. |
| 25 | type 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. |
| 40 | func (Tracing) CaddyModule() caddy.ModuleInfo { |
nothing calls this directly
no outgoing calls
no test coverage detected