telemetry

package
v0.1.0-9553c2f Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package telemetry provides shared OpenTelemetry propagators and helpers.

Index

Constants

This section is empty.

Variables

View Source
var (
	// HTTPPropagator is a composite propagator for HTTP services supporting
	// traceparent (OTel) and B3 (OpenCensus HTTP).
	HTTPPropagator = propagation.NewCompositeTextMapPropagator(
		propagation.TraceContext{},
		b3prop.New(b3prop.WithInjectEncoding(b3prop.B3MultipleHeader)),
	)

	// GRPCPropagator is a composite propagator for gRPC services supporting
	// traceparent (OTel) and grpc-trace-bin (OpenCensus gRPC).
	GRPCPropagator = propagation.NewCompositeTextMapPropagator(
		propagation.TraceContext{},
		ocprop.Binary{},
	)
)

Functions

func SetupCloudTracing

func SetupCloudTracing(ctx context.Context, projectID, serviceName string, sampler sdktrace.Sampler) (*sdktrace.TracerProvider, error)

SetupCloudTracing initializes OpenTelemetry tracing with Google Cloud Trace exporter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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