Documentation ¶
Index ¶
- Constants
- func ContextWithHeaders(r *http.Request) context.Context
- func GetFeature(ctx context.Context, fn *string) (context.Context, *string)
- func GetPriorityBoost(ctx context.Context, pb *int32) (context.Context, *int32)
- func GetTextMapPropagator() propagation.TextMapPropagator
- func GetTracerProvider() trace.TracerProvider
- func InitTextMapPropagator(propagator propagation.TextMapPropagator)
- func Setup(ctx context.Context, sc SetupConfig) (shutdown func(context.Context) error, err error)
- type MetadataSupplier
- type SetupConfig
- type StanzaHeaders
Constants ¶
View Source
const METRIC_EXPORT_INTERVAL = 10 * time.Second
Batch interval for sending metrics to the OTEL collector
Variables ¶
This section is empty.
Functions ¶
func ContextWithHeaders ¶
Helper function which extracts and propagates OTEL TraceContext, Baggage, and StanzaHeaders from a given http.Request.
func GetPriorityBoost ¶
func GetTextMapPropagator ¶
func GetTextMapPropagator() propagation.TextMapPropagator
GetTextMapPropagator is a passthrough helper function
func GetTracerProvider ¶
func GetTracerProvider() trace.TracerProvider
GetTracePropagator is a passthrough helper function
func InitTextMapPropagator ¶
func InitTextMapPropagator(propagator propagation.TextMapPropagator)
InitTextMapPropagator is a passthrough helper function
Types ¶
type MetadataSupplier ¶
func (*MetadataSupplier) Get ¶
func (s *MetadataSupplier) Get(key string) string
Set returns value for given key from metadata.
func (*MetadataSupplier) Keys ¶
func (s *MetadataSupplier) Keys() []string
Keys returns the keys who's values are set with Inject.
func (*MetadataSupplier) Set ¶
func (s *MetadataSupplier) Set(key string, value string)
Set sets key-value pairs in metadata.
type SetupConfig ¶
type StanzaHeaders ¶
type StanzaHeaders struct{}
func (StanzaHeaders) Extract ¶
func (s StanzaHeaders) Extract(parent context.Context, carrier propagation.TextMapCarrier) context.Context
Extract returns a copy of parent with the Stanza Headers from the carrier added.
func (StanzaHeaders) Fields ¶
func (s StanzaHeaders) Fields() (headers []string)
Fields returns the keys who's values are set with Inject.
func (StanzaHeaders) Inject ¶
func (s StanzaHeaders) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject sets Stanza Headers from ctx into the carrier.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.