Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportEnvironment ¶
ExportEnvironment gives the OTLP endpoint of the configuration to the OpenTelemetry SDK, which reads it from OTEL_EXPORTER_OTLP_ENDPOINT. It changes the environment of the process, so it belongs to the startup wiring (main): call it once, before Init.
Types ¶
type OtelService ¶
type OtelService struct {
// contains filtered or unexported fields
}
func NewOtelService ¶
func NewOtelService() OtelService
func (*OtelService) Init ¶
Init creates the OpenTelemetry tracer provider of the service. It does not change any process-wide state: Install does, and is called by the startup wiring only.
func (*OtelService) Install ¶
func (s *OtelService) Install(zapLog *zap.Logger)
Install makes the tracer provider of the service (or a no-op one when Init found OpenTelemetry disabled) the global OpenTelemetry provider, with the error handler and the propagator of the relay proxy. The OpenTelemetry API only offers process-wide registration, so it is the startup wiring (main) that asks for it.