tracing

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 24 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WithTimestamp  = trace.WithTimestamp
	WithAttributes = trace.WithAttributes
	Int            = attribute.Int
	Bool           = attribute.Bool
	String         = attribute.String
)
View Source
var NoOp = Config{Provider: None}

Functions

func MarshalContext added in v0.4.0

func MarshalContext(c trace.SpanContext) ([]byte, error)

func NewLabels added in v0.4.0

func NewLabels(keys []string) labels

func UnmarshalContext added in v0.4.0

func UnmarshalContext(data []byte) (trace.SpanContext, error)

func WithMetricsOpts added in v0.4.0

func WithMetricsOpts(o MetricsOpts) trace.TracerOption

Types

type Config added in v0.4.1

type Config struct {
	Provider TracerType     `mapstructure:"provider"`
	File     FileConfig     `mapstructure:"file"`
	Otpl     OtplConfig     `mapstructure:"optl"`
	Sampling SamplingConfig `mapstructure:"sampling"`
}

type EventOption added in v0.4.0

type EventOption = trace.EventOption

type FileConfig added in v0.4.1

type FileConfig struct {
	Path string `mapstructure:"path"`
}

type KeyValue added in v0.4.0

type KeyValue = attribute.KeyValue

type LabelName added in v0.4.0

type LabelName = string

type MetricsOpts added in v0.4.0

type MetricsOpts struct {
	Namespace  string
	LabelNames []LabelName
}

type OtplConfig added in v0.4.1

type OtplConfig struct {
	Address string `mapstructure:"address"`
}

type Provider added in v0.3.0

type Provider = trace.TracerProvider

Provider is an alias for tracing.Provider

func GetProvider added in v0.4.1

func GetProvider(sp services.Provider) (Provider, error)

GetProvider returns the Provider from the passed services.Provider. It returns an error if Provider does not exit.

func NewProvider added in v0.3.0

func NewProvider(confService driver.ConfigService, metricsProvider metrics.Provider) (Provider, error)

func NewProviderFromConfig added in v0.4.1

func NewProviderFromConfig(c Config) (Provider, error)

func NewProviderFromConfigService added in v0.4.1

func NewProviderFromConfigService(confService driver.ConfigService) (Provider, error)

func NewProviderWithBackingProvider added in v0.4.1

func NewProviderWithBackingProvider(tp Provider, mp metricsProvider) Provider

func NewProviderWithNodeName added in v0.4.0

func NewProviderWithNodeName(p Provider, nodeName string) Provider

type SamplingConfig added in v0.4.1

type SamplingConfig struct {
	Ratio float64 `mapstructure:"ratio"`
}

type SpanEndOption added in v0.4.0

type SpanEndOption = trace.SpanEndOption

type SpanStartOption added in v0.4.0

type SpanStartOption = trace.SpanStartOption

type TracerType added in v0.4.1

type TracerType string
const (
	None        TracerType = "none"
	Otpl        TracerType = "otpl"
	File        TracerType = "file"
	Console     TracerType = "console"
	ServiceName            = "FSC"
)

Jump to

Keyboard shortcuts

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