Documentation ¶
Index ¶
Constants ¶
const ( OtelServiceNameEnvKey = "OTEL_SERVICE_NAME" OtelTracesExporterTypesEnvKey = "OTEL_TRACES_EXPORTER" OtelTracesOtlpExporterType = SpanExporterType("otlp") OtelExporterOtlpTracesProtocolEnvKey = "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" OtelExporterOtlpTracesGrcpProtocol = "grpc" )
Variables ¶
This section is empty.
Functions ¶
func ResourceServiceName ¶ added in v1.24.0
func ResourceServiceName( rsn primitives.ServiceName, envVars envVarLookup, ) string
ResourceServiceName returns the OpenTelemetry tracing service name for a Temporal service.
func SpanExportersFromEnv ¶ added in v1.24.0
func SpanExportersFromEnv( envVars envVarLookup, ) (map[SpanExporterType]otelsdktrace.SpanExporter, error)
SpanExportersFromEnv creates OTEL span exporters from environment variables.
Types ¶
type ClientStatsHandler ¶ added in v1.26.2
ClientStatsHandler gives a named type to the grpc.UnaryClientInterceptor implementation provided by otelgrpc.
func NewClientStatsHandler ¶ added in v1.26.2
func NewClientStatsHandler( tp trace.TracerProvider, tmp propagation.TextMapPropagator, ) ClientStatsHandler
NewClientStatsHandler creates a new gRPC stats handler that tracks each request with an encapsulating span using the provided TracerProvider and TextMapPropagator.
NOTE: If the TracerProvider is `noop.TracerProvider`, it returns `nil`.
type ExportConfig ¶
type ExportConfig struct {
// contains filtered or unexported fields
}
ExportConfig represents YAML structured configuration for a set of OTEL trace/span/log exporters.
func (*ExportConfig) MetricExporters ¶
func (ec *ExportConfig) MetricExporters() ([]metric.Exporter, error)
func (*ExportConfig) SpanExporters ¶
func (ec *ExportConfig) SpanExporters() (map[SpanExporterType]otelsdktrace.SpanExporter, error)
func (*ExportConfig) UnmarshalYAML ¶
func (ec *ExportConfig) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML loads the state of an ExportConfig from parsed YAML
type ServerStatsHandler ¶ added in v1.26.2
ServerStatsHandler gives a named type to the stats.Handler implementation provided by otelgrpc.
func NewServerStatsHandler ¶ added in v1.26.2
func NewServerStatsHandler( tp trace.TracerProvider, tmp propagation.TextMapPropagator, logger log.Logger, ) ServerStatsHandler
NewServerStatsHandler creates a new gRPC stats handler that tracks each request with an encapsulating span using the provided TracerProvider and TextMapPropagator.
NOTE: If the TracerProvider is `noop.TracerProvider`, it returns `nil`.
type SpanExporterType ¶ added in v1.24.0
type SpanExporterType string