Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTraceProvider ¶
func InitTraceProvider(ctx context.Context, serviceName, serviceVersion string) (*trace.TracerProvider, error)
InitTraceProvider initializes OpenTelemetry trace provider Configuration is driven entirely by standard OpenTelemetry environment variables:
- OTEL_EXPORTER_OTLP_ENDPOINT: OTLP collector endpoint (if not set, uses stdout)
- OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" (default) or "http/protobuf"
- OTEL_TRACES_SAMPLER: sampler type (default: "parentbased_traceidratio")
- OTEL_TRACES_SAMPLER_ARG: sampling rate 0.0-1.0 (default: 1.0)
- OTEL_RESOURCE_ATTRIBUTES: additional resource attributes (k=v,k2=v2 format)
- OTEL_PROPAGATORS: list of propagators to use (default: "tracecontext,baggage")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.