component-basek8s.io/component-base/tracing Index | Files | Directories

package tracing

import "k8s.io/component-base/tracing"

Index

Functions

func NewProvider

func NewProvider(ctx context.Context,
	tracingConfig *v1.TracingConfiguration,
	addedOpts []otlpgrpc.Option,
	resourceOpts []resource.Option,
) (oteltrace.TracerProvider, error)

NewProvider creates a TracerProvider in a component, and enforces recommended tracing behavior

func Propagators

func Propagators() propagation.TextMapPropagator

Propagators returns the recommended set of propagators.

func WithTracing

func WithTracing(handler http.Handler, tp oteltrace.TracerProvider, serviceName string) http.Handler

WithTracing adds tracing to requests if the incoming request is sampled

func WrapperFor

WrapperFor can be used to add tracing to a *rest.Config. Example usage: tp := NewProvider(...) config, _ := rest.InClusterConfig() config.Wrap(WrapperFor(&tp)) kubeclient, _ := clientset.NewForConfig(config)

Source Files

utils.go

Directories

PathSynopsis
tracing/api
tracing/api/v1
Version
v0.25.7-rc.0
Published
Jan 19, 2023
Platform
js/wasm
Imports
11 packages
Last checked
4 minutes ago

Tools for package owners.