Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractContext ¶
ExtractContext extracts the OpenTelemetry headers (in lowercase) from the context and returns the new context.
func HandleSpanError ¶
HandleSpanError sets the status of the span to error and records the error.
func InjectContext ¶
InjectContext injects the context with the OpenTelemetry headers (in lowercase) and returns the new context.
Types ¶
type Telemetry ¶
type Telemetry struct { LibraryName string ServiceName string ServiceVersion string DeploymentEnv string CollectorExporterEndpoint string TracerProvider *sdktrace.TracerProvider MetricProvider *sdkmetric.MeterProvider LoggerProvider *sdklog.LoggerProvider // contains filtered or unexported fields }
func (*Telemetry) InitializeTelemetry ¶
InitializeTelemetry initializes the telemetry providers and sets them globally. (Logger is being passed as a parameter because it not exists in the global context at this point to be injected)
func (*Telemetry) ShutdownTelemetry ¶
func (tl *Telemetry) ShutdownTelemetry()
ShutdownTelemetry shuts down the telemetry providers and exporters.
Click to show internal directories.
Click to hide internal directories.