trace

package
v2.29.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Propagator is the default Reva propagator.
	Propagator = propagation.NewCompositeTextMapPropagator(propagation.Baggage{}, propagation.TraceContext{})
)

Functions

func ContextGetTracerProvider

func ContextGetTracerProvider(ctx context.Context) trace.TracerProvider

ContextGetTracerProvider returns the TracerProvider associated with the ctx. If no TracerProvider is associated is associated, the global default TracerProvider is returned

func ContextSetTracerProvider

func ContextSetTracerProvider(ctx context.Context, p trace.TracerProvider) context.Context

ContextSetTracerProvider returns a copy of ctx with p associated.

func DefaultProvider

func DefaultProvider() trace.TracerProvider

DefaultProvider returns the "global" default TracerProvider Currently used by the pool to get the global tracer

func InitDefaultTracerProvider deprecated

func InitDefaultTracerProvider(collector, endpoint string)

InitDefaultTracerProvider initializes a global default jaeger TracerProvider at a package level.

Deprecated: Use NewTracerProvider and SetDefaultTracerProvider to properly initialize a tracer provider with options

func NewTracerProvider

func NewTracerProvider(opts ...Option) trace.TracerProvider

NewTracerProvider returns a new TracerProvider, configure for the specified service

func SetDefaultTracerProvider

func SetDefaultTracerProvider(tp trace.TracerProvider)

SetDefaultTracerProvider sets the default trace provider

Types

type Option

type Option func(o *Options)

Option for trace

func WithCollector

func WithCollector(v string) Option

WithCollector option Deprecated: unused

func WithEnabled

func WithEnabled() Option

WithEnabled option

func WithEndpoint

func WithEndpoint(v string) Option

WithEndpoint option

func WithExporter

func WithExporter(v string) Option

WithExporter option Deprecated: unused

func WithInsecure

func WithInsecure() Option

WithInsecure option

func WithServiceName

func WithServiceName(v string) Option

WithServiceName option

func WithTransportCredentials

func WithTransportCredentials(v credentials.TransportCredentials) Option

WithTransportCredentials option

type Options

type Options struct {
	Enabled              bool
	Insecure             bool
	Exporter             string
	Collector            string
	Endpoint             string
	ServiceName          string
	TransportCredentials credentials.TransportCredentials
}

Options for trace

Jump to

Keyboard shortcuts

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