traceproducer

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Resource map[string]any `json:"resource"`
	Scope    map[string]any `json:"scope"`
	Item     map[string]any `json:"item"`
}

type Span

type Span struct {
	Ref                string          `json:"ref"`
	Name               string          `json:"name"`
	Kind               string          `json:"kind"`
	StartTs            config.Duration `json:"start_ts"`
	Duration           config.Duration `json:"duration"`
	Error              bool            `json:"error"`
	ResourceAttributes map[string]any  `json:"resourceAttributes"`
	Attributes         map[string]any  `json:"attributes"`
	Children           []Span          `json:"children"`
}

type TraceProducer

type TraceProducer interface {
	Emit(state *state.RunState, tb *signalbuilder.TracesBuilder) error
	SetRate(at time.Duration, to time.Duration, now time.Duration, rate float64)
	SetStart(start float64)
}

func NewTraceProducer

func NewTraceProducer(spec TraceProducerSpec) (TraceProducer, error)

type TraceProducerSpec

type TraceProducerSpec struct {
	At       time.Duration `mapstructure:"at,omitempty" yaml:"at,omitempty" json:"at,omitempty"`
	To       time.Duration `mapstructure:"to,omitempty" yaml:"to,omitempty" json:"to,omitempty"`
	Exemplar Span          `mapstructure:"exemplar" yaml:"exemplar" json:"exemplar"`
	Disabled bool          `mapstructure:"disabled,omitempty" yaml:"disabled,omitempty" json:"disabled,omitempty"`
	Rate     float64       `mapstructure:"rate,omitempty" yaml:"rate,omitempty" json:"rate,omitempty"`
}

Jump to

Keyboard shortcuts

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