telemetry

package
v1.24.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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 ClientTraceInterceptor

type ClientTraceInterceptor grpc.UnaryClientInterceptor

ClientTraceInterceptor gives a named type to the grpc.UnaryClientInterceptor implementation provided by otelgrpc

func NewClientTraceInterceptor

func NewClientTraceInterceptor(
	tp trace.TracerProvider,
	tmp propagation.TextMapPropagator,
) ClientTraceInterceptor

NewClientTraceInterceptor creates a new gRPC client interceptor that tracks each request with an encapsulating span using the provided TracerProvider and TextMapPropagator.

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 ServerTraceInterceptor

type ServerTraceInterceptor grpc.UnaryServerInterceptor

ServerTraceInterceptor gives a named type to the grpc.UnaryServerInterceptor implementation provided by otelgrpc

func NewServerTraceInterceptor

func NewServerTraceInterceptor(
	tp trace.TracerProvider,
	tmp propagation.TextMapPropagator,
) ServerTraceInterceptor

NewServerTraceInterceptor creates a new gRPC server interceptor that tracks each request with an encapsulating span using the provided TracerProvider and TextMapPropagator.

type SpanExporterType added in v1.24.0

type SpanExporterType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL