Documentation ¶
Index ¶
- Constants
- Variables
- func GetAmTraceID(ctx context.Context) string
- func GetCloudflareRayID(ctx context.Context) string
- func InitOTLProvider(config *OTLConfig) (func() error, error)
- func WithAmTraceID(parent context.Context, traceID string) context.Context
- func WithCloudflareRayID(parent context.Context, cloudflareRayID string) context.Context
- type OTLConfig
Constants ¶
View Source
const ( GRPC protocol = "gRPC" HTTP protocol = "HTTP" )
Variables ¶
View Source
var DefaultOTLConfig = &OTLConfig{ Protocol: GRPC, Endpoint: getDefaultOTLEndpoint(), Sampler: sdktrace.ParentBased(sdktrace.TraceIDRatioBased(0.1)), Exporter: os.Getenv("OTEL_EXPORTER_NAME"), URLPath: "/ote/v1/traces", IsExport: true, }
Functions ¶
func GetAmTraceID ¶
func GetCloudflareRayID ¶
func InitOTLProvider ¶
InitOTLProvider initializes an OTLP exporter, and configures the corresponding trace providers.
Types ¶
Click to show internal directories.
Click to hide internal directories.