Documentation
¶
Overview ¶
Package otelutil contains common utilities for working with OpenTelemetry.
Index ¶
Constants ¶
View Source
const ( ExporterProtoGRPC = "grpc" ExporterProtoHTTPProtobuf = "http/protobuf" ExporterProtoStdout = "stdout" )
Supported OpenTelemetry exporter protocols that are expected to be present in the environment under EnvExporterProto.
View Source
const EnvExporterProto = "OTEL_EXPORTER_OTLP_PROTOCOL"
EnvExporterProto is the name of the environment variable holding the OpenTelemetry exporter protocol.
See https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/.
Variables ¶
This section is empty.
Functions ¶
func EndSpan ¶
EndSpan is a deferred helper that records the error sets the status of the span before ending it.
Types ¶
type Config ¶
type Config struct {
// ServiceName is the name to use for exporting traces. It must not be
// empty.
ServiceName string
}
Config is the configuration structure for the OpenTelemetry infrastructure.
func (*Config) Validate ¶
Validate implements the validate.Interface for *Config. c may be nil.
Click to show internal directories.
Click to hide internal directories.