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.
Click to show internal directories.
Click to hide internal directories.