model

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 1 Imported by: 873

Documentation

Index

Constants

View Source
const (
	// SampledFlag is the bit set in Flags in order to define a span as a sampled span
	SampledFlag = modelv1.SampledFlag
	// DebugFlag is the bit set in Flags in order to define a span as a debug span
	DebugFlag = modelv1.SampledFlag
	// FirehoseFlag is the bit in Flags in order to define a span as a firehose span
	FirehoseFlag = modelv1.SampledFlag
)
View Source
const (
	StringType  = modelv1.StringType
	BoolType    = modelv1.BoolType
	Int64Type   = modelv1.Int64Type
	Float64Type = modelv1.Float64Type
	BinaryType  = modelv1.BinaryType

	SpanKindKey     = modelv1.SpanKindKey
	SamplerTypeKey  = modelv1.SamplerTypeKey
	SamplerParamKey = modelv1.SamplerParamKey
)

These constants are kept mostly for backwards compatibility.

View Source
const (
	SamplerTypeUnrecognized  SamplerType = modelv1.SamplerTypeUnrecognized
	SamplerTypeProbabilistic             = modelv1.SamplerTypeProbabilistic
	SamplerTypeLowerBound                = modelv1.SamplerTypeLowerBound
	SamplerTypeRateLimiting              = modelv1.SamplerTypeRateLimiting
	SamplerTypeConst                     = modelv1.SamplerTypeConst
)
View Source
const (
	// ChildOf span reference type describes a reference to a parent span
	// that depends on the response from the current (child) span
	ChildOf = modelv1.ChildOf

	// FollowsFrom span reference type describes a reference to a "parent" span
	// that does not depend on the response from the current (child) span
	FollowsFrom = modelv1.FollowsFrom
)
View Source
const (
	// JaegerDependencyLinkSource describes a dependency diagram that was generated from Jaeger traces.
	JaegerDependencyLinkSource = modelv1.JaegerDependencyLinkSource
)

Variables

View Source
var Binary = modelv1.Binary

Binary creates a Binary-typed KeyValue

View Source
var Bool = modelv1.Bool

Bool creates a Bool-typed KeyValue

View Source
var DurationAsMicroseconds = modelv1.DurationAsMicroseconds

DurationAsMicroseconds converts time.Duration to microseconds, which is the format the Duration field is stored in the Span.

View Source
var EpochMicrosecondsAsTime = modelv1.EpochMicrosecondsAsTime

EpochMicrosecondsAsTime converts microseconds since epoch to time.Time value.

View Source
var Float64 = modelv1.Float64

Float64 creates a Float64-typed KeyValue

View Source
var HashCode = modelv1.HashCode

HashCode calculates a FNV-1a hash code for a Hashable object.

View Source
var Int64 = modelv1.Int64

Int64 creates a Int64-typed KeyValue

View Source
var MaybeAddParentSpanID = modelv1.MaybeAddParentSpanID

MaybeAddParentSpanID adds non-zero parentSpanID to refs as a child-of reference. We no longer store ParentSpanID in the domain model, but the data in the database or other formats might still have these IDs without representing them in the References, so this converts parent IDs to canonical reference format.

View Source
var MicrosecondsAsDuration = modelv1.MicrosecondsAsDuration

MicrosecondsAsDuration converts duration in microseconds to time.Duration value.

View Source
var NewChildOfRef = modelv1.NewChildOfRef

NewChildOfRef creates a new child-of span reference.

View Source
var NewFollowsFromRef = modelv1.NewFollowsFromRef

NewFollowsFromRef creates a new follows-from span reference.

View Source
var NewProcess = modelv1.NewProcess

NewProcess creates a new Process for given serviceName and tags. The tags are sorted in place and kept in the same array/slice, in order to store the Process in a canonical form that is relied upon by the Equal and Hash functions.

View Source
var NewSpanID = modelv1.NewSpanID

NewSpanID creates a new SpanID from a 64bit unsigned int.

View Source
var NewTraceID = modelv1.NewTraceID

NewTraceID creates a new TraceID from two 64bit unsigned ints.

View Source
var SortSpan = modelv1.SortSpan

SortSpan deep sorts a span: this sorts its tags, logs by timestamp, tags in logs, and tags in process.

View Source
var SortTrace = modelv1.SortTrace

SortTrace deep sorts a trace's spans by SpanID.

View Source
var SortTraceIDs = modelv1.SortTraceIDs

SortTraceIDs sorts a list of TraceIDs

View Source
var SortTraces = modelv1.SortTraces

SortTraces deep sorts a list of traces by TraceID.

View Source
var SpanIDFromBytes = modelv1.SpanIDFromBytes

SpanIDFromBytes creates a SpandID from list of bytes

View Source
var SpanIDFromString = modelv1.SpanIDFromString

SpanIDFromString creates a SpanID from a hexadecimal string

View Source
var SpanKindFromString = modelv1.SpanKindFromString
View Source
var SpanKindTag = modelv1.SpanKindTag
View Source
var String = modelv1.String

String creates a String-typed KeyValue

View Source
var TimeAsEpochMicroseconds = modelv1.TimeAsEpochMicroseconds

TimeAsEpochMicroseconds converts time.Time to microseconds since epoch, which is the format the StartTime field is stored in the Span.

View Source
var TraceIDFromBytes = modelv1.TraceIDFromBytes

TraceIDFromBytes creates a TraceID from list of bytes

View Source
var TraceIDFromString = modelv1.TraceIDFromString

TraceIDFromString creates a TraceID from a hexadecimal string

Functions

This section is empty.

Types

type Batch added in v1.6.0

type Batch = modelv1.Batch

Note that both Span and Batch may contain a Process. This is different from the Thrift model which was only used for transport, because Proto model is also used by the backend as the domain model, where once a batch is received it is split into individual spans which are all processed independently, and therefore they all need a Process. As far as on-the-wire semantics, both Batch and Spans in the same message may contain their own instances of Process, with span.Process taking priority over batch.Process.

type DependencyLink = modelv1.DependencyLink

type Flags

type Flags = modelv1.Flags

Flags is a bit map of flags for a span

type Hashable

type Hashable = modelv1.Hashable

Hashable interface is for type that can participate in a hash computation by writing their data into io.Writer, which is usually an instance of hash.Hash.

type KeyValue

type KeyValue = modelv1.KeyValue

type KeyValues

type KeyValues = modelv1.KeyValues

KeyValues is a type alias that exposes convenience functions like Sort, FindByKey.

type Log

type Log = modelv1.Log

type Process

type Process = modelv1.Process

type SamplerType added in v1.49.0

type SamplerType = modelv1.SamplerType

type Span

type Span = modelv1.Span

type SpanID

type SpanID = modelv1.SpanID

SpanID is a random 64bit identifier for a span

type SpanKind added in v1.65.0

type SpanKind = modelv1.SpanKind
const (
	SpanKindClient      SpanKind = modelv1.SpanKindClient
	SpanKindServer      SpanKind = modelv1.SpanKindServer
	SpanKindProducer    SpanKind = modelv1.SpanKindProducer
	SpanKindConsumer    SpanKind = modelv1.SpanKindConsumer
	SpanKindInternal    SpanKind = modelv1.SpanKindInternal
	SpanKindUnspecified SpanKind = modelv1.SpanKindUnspecified
)

type SpanRef

type SpanRef = modelv1.SpanRef

type SpanRefType

type SpanRefType = modelv1.SpanRefType
const (
	SpanRefType_CHILD_OF     SpanRefType = modelv1.SpanRefType_CHILD_OF
	SpanRefType_FOLLOWS_FROM SpanRefType = modelv1.SpanRefType_FOLLOWS_FROM
)

type Trace

type Trace = modelv1.Trace

type TraceID

type TraceID = modelv1.TraceID

TraceID is a random 128bit identifier for a trace

type Trace_ProcessMapping added in v1.6.0

type Trace_ProcessMapping = modelv1.Trace_ProcessMapping

type ValueType

type ValueType = modelv1.ValueType
const (
	ValueType_STRING  ValueType = modelv1.ValueType_STRING
	ValueType_BOOL    ValueType = modelv1.ValueType_BOOL
	ValueType_INT64   ValueType = modelv1.ValueType_INT64
	ValueType_FLOAT64 ValueType = modelv1.ValueType_FLOAT64
	ValueType_BINARY  ValueType = modelv1.ValueType_BINARY
)

Directories

Path Synopsis
Package adjuster contains various adjusters for model.Trace.
Package adjuster contains various adjusters for model.Trace.
Package converter contains various utilities for converting model.Trace to/from other data modes, like Thrift, or UI JSON.
Package converter contains various utilities for converting model.Trace to/from other data modes, like Thrift, or UI JSON.
json
Package json allows converting model.Trace to external JSON data model.
Package json allows converting model.Trace to external JSON data model.
thrift
Package thrift allows converting model.Trace to/from various thrift models.
Package thrift allows converting model.Trace to/from various thrift models.
thrift/jaeger
Package jaeger allows converting model.Trace to/from jaeger.thrift model.
Package jaeger allows converting model.Trace to/from jaeger.thrift model.
thrift/zipkin
Package zipkin allows converting model.Trace to/from zipkin.thrift model.
Package zipkin allows converting model.Trace to/from zipkin.thrift model.
Package json defines the external JSON representation for Jaeger traces.
Package json defines the external JSON representation for Jaeger traces.

Jump to

Keyboard shortcuts

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