telemetry

package
v1.27.0-127.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 31 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 DebugMode added in v1.27.0

func DebugMode() bool

func IsEnabled added in v1.27.0

func IsEnabled(tp trace.TracerProvider) bool

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

type ClientStatsHandler stats.Handler

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

type ServerStatsHandler stats.Handler

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

Jump to

Keyboard shortcuts

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