Back to godoc.org
go.opentelemetry.io/collector/consumer/pdata

package pdata

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Overview

Package pdata (pipeline data) implements data structures that represent telemetry data in-memory. All data received is converted into this format and travels through the pipeline in this format and that is converted from this format by exporters when sending.

Current implementation primarily uses OTLP ProtoBuf structs as the underlying data structures for many of of the declared structs. We keep a pointer to OTLP protobuf in the "orig" member field. This allows efficient translation to/from OTLP wire protocol. Note that the underlying data structure is kept private so that in the future we are free to make changes to it to make more optimal.

Most of internal data structures must be created via New* functions. Zero-initialized structures in most cases are not valid (read comments for each struct to know if it is the case). This is a slight deviation from idiomatic Go to avoid unnecessary pointer checks in dozens of functions which assume the invariant that "orig" member is non-nil. Several structures also provide New*Slice functions that allows to create more than one instance of the struct more efficiently instead of calling New* repeatedly. Use it where appropriate.

Index

Constants

const (
	AttributeValueSTRING = AttributeValueType(otlpcommon.AttributeKeyValue_STRING)
	AttributeValueINT    = AttributeValueType(otlpcommon.AttributeKeyValue_INT)
	AttributeValueDOUBLE = AttributeValueType(otlpcommon.AttributeKeyValue_DOUBLE)
	AttributeValueBOOL   = AttributeValueType(otlpcommon.AttributeKeyValue_BOOL)
)
const (
	MetricTypeInvalid         = MetricType(otlpmetrics.MetricDescriptor_INVALID_TYPE)
	MetricTypeInt64           = MetricType(otlpmetrics.MetricDescriptor_INT64)
	MetricTypeDouble          = MetricType(otlpmetrics.MetricDescriptor_DOUBLE)
	MetricTypeMonotonicInt64  = MetricType(otlpmetrics.MetricDescriptor_MONOTONIC_INT64)
	MetricTypeMonotonicDouble = MetricType(otlpmetrics.MetricDescriptor_MONOTONIC_DOUBLE)
	MetricTypeHistogram       = MetricType(otlpmetrics.MetricDescriptor_HISTOGRAM)
	MetricTypeSummary         = MetricType(otlpmetrics.MetricDescriptor_SUMMARY)
)
const (
	SpanKindUNSPECIFIED = SpanKind(0)
	SpanKindINTERNAL    = SpanKind(otlptrace.Span_INTERNAL)
	SpanKindSERVER      = SpanKind(otlptrace.Span_SERVER)
	SpanKindCLIENT      = SpanKind(otlptrace.Span_CLIENT)
	SpanKindPRODUCER    = SpanKind(otlptrace.Span_PRODUCER)
	SpanKindCONSUMER    = SpanKind(otlptrace.Span_CONSUMER)
)

func TracesToOtlp

func TracesToOtlp(td Traces) []*otlptrace.ResourceSpans

TracesToOtlp converts the internal Traces to the OTLP.

type AttributeMap

type AttributeMap struct {
	// contains filtered or unexported fields
}

AttributeMap stores a map of attribute keys to values.

func NewAttributeMap

func NewAttributeMap() AttributeMap

NewAttributeMap creates a AttributeMap with 0 elements.

func (AttributeMap) CopyTo

func (am AttributeMap) CopyTo(dest AttributeMap)

CopyTo copies all elements from the current map to the dest.

func (AttributeMap) Delete

func (am AttributeMap) Delete(key string) bool

Delete deletes the entry associated with the key and returns true if the key was present in the map, otherwise returns false.

func (AttributeMap) ForEach

func (am AttributeMap) ForEach(f func(k string, v AttributeValue))

ForEach iterates over the every elements in the map by calling the provided func.

Example:

it := sm.ForEach(func(k string, v StringValue) {

...

})

func (AttributeMap) Get

func (am AttributeMap) Get(key string) (AttributeValue, bool)

Get returns the AttributeKeyValue associated with the key and true, otherwise an invalid instance of the AttributeKeyValue and false. Calling any functions on the returned invalid instance will cause a panic.

func (AttributeMap) InitEmptyWithCapacity

func (am AttributeMap) InitEmptyWithCapacity(cap int)

InitEmptyWithCapacity constructs an empty AttributeMap with predefined slice capacity.

func (AttributeMap) InitFromMap

func (am AttributeMap) InitFromMap(attrMap map[string]AttributeValue) AttributeMap

InitFromMap overwrites the entire AttributeMap and reconstructs the AttributeMap with values from the given map[string]string.

Returns the same instance to allow nicer code like: assert.EqualValues(t, NewAttributeMap().InitFromMap(map[string]AttributeValue{...}), actual)

func (AttributeMap) Insert

func (am AttributeMap) Insert(k string, v AttributeValue)

Insert adds the AttributeValue to the map when the key does not exist. No action is applied to the map where the key already exists.

Calling this function with a zero-initialized AttributeValue struct will cause a panic.

Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.

func (AttributeMap) InsertBool

func (am AttributeMap) InsertBool(k string, v bool)

Insert adds the bool Value to the map when the key does not exist. No action is applied to the map where the key already exists.

func (AttributeMap) InsertDouble

func (am AttributeMap) InsertDouble(k string, v float64)

Insert adds the double Value to the map when the key does not exist. No action is applied to the map where the key already exists.

func (AttributeMap) InsertInt

func (am AttributeMap) InsertInt(k string, v int64)

Insert adds the int Value to the map when the key does not exist. No action is applied to the map where the key already exists.

func (AttributeMap) InsertString

func (am AttributeMap) InsertString(k string, v string)

Insert adds the string Value to the map when the key does not exist. No action is applied to the map where the key already exists.

func (AttributeMap) Len

func (am AttributeMap) Len() int

Len returns the length of this map.

Because the AttributeMap is represented internally by a slice of pointers, and the data are comping from the wire, it is possible that when iterating using "ForEach" to get access to fewer elements because nil elements are skipped.

func (AttributeMap) Sort

func (am AttributeMap) Sort() AttributeMap

Sort sorts the entries in the AttributeMap so two instances can be compared. Returns the same instance to allow nicer code like: assert.EqualValues(t, expected.Sort(), actual.Sort())

func (AttributeMap) Update

func (am AttributeMap) Update(k string, v AttributeValue)

Update updates an existing AttributeValue with a value. No action is applied to the map where the key does not exist.

Calling this function with a zero-initialized AttributeValue struct will cause a panic.

Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.

func (AttributeMap) UpdateBool

func (am AttributeMap) UpdateBool(k string, v bool)

Update updates an existing bool Value with a value. No action is applied to the map where the key does not exist.

func (AttributeMap) UpdateDouble

func (am AttributeMap) UpdateDouble(k string, v float64)

Update updates an existing double Value with a value. No action is applied to the map where the key does not exist.

func (AttributeMap) UpdateInt

func (am AttributeMap) UpdateInt(k string, v int64)

Update updates an existing int Value with a value. No action is applied to the map where the key does not exist.

func (AttributeMap) UpdateString

func (am AttributeMap) UpdateString(k string, v string)

Update updates an existing string Value with a value. No action is applied to the map where the key does not exist.

func (AttributeMap) Upsert

func (am AttributeMap) Upsert(k string, v AttributeValue)

Upsert performs the Insert or Update action. The AttributeValue is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

Calling this function with a zero-initialized AttributeValue struct will cause a panic.

Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.

func (AttributeMap) UpsertBool

func (am AttributeMap) UpsertBool(k string, v bool)

Upsert performs the Insert or Update action. The bool Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

func (AttributeMap) UpsertDouble

func (am AttributeMap) UpsertDouble(k string, v float64)

Upsert performs the Insert or Update action. The double Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

func (AttributeMap) UpsertInt

func (am AttributeMap) UpsertInt(k string, v int64)

Upsert performs the Insert or Update action. The int Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

func (AttributeMap) UpsertString

func (am AttributeMap) UpsertString(k string, v string)

Upsert performs the Insert or Update action. The AttributeValue is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

type AttributeValue

type AttributeValue struct {
	// contains filtered or unexported fields
}

AttributeValue represents a value of an attribute. Typically used in AttributeMap. Must use one of NewAttributeValue* functions below to create new instances.

Intended to be passed by value since internally it is just a pointer to actual value representation. For the same reason passing by value and calling setters will modify the original, e.g.:

function f1(val AttributeValue) { val.SetIntVal(234) }
function f2() {
	v := NewAttributeValueString("a string")
   f1(v)
   _ := v.Type() // this will return AttributeValueINT
}

Important: zero-initialized instance is not valid for use. All AttributeValue functions bellow must be called only on instances that are created via NewAttributeValue+ functions.

func NewAttributeValueBool

func NewAttributeValueBool(v bool) AttributeValue

NewAttributeValueBool creates a new AttributeValue with the given bool value.

func NewAttributeValueDouble

func NewAttributeValueDouble(v float64) AttributeValue

NewAttributeValueDouble creates a new AttributeValue with the given float64 value.

func NewAttributeValueInt

func NewAttributeValueInt(v int64) AttributeValue

NewAttributeValueInt creates a new AttributeValue with the given int64 value.

func NewAttributeValueSlice

func NewAttributeValueSlice(len int) []AttributeValue

NewAttributeValueSlice creates a slice of attributes values that are correctly initialized.

func NewAttributeValueString

func NewAttributeValueString(v string) AttributeValue

NewAttributeValueString creates a new AttributeValue with the given string value.

func (AttributeValue) BoolVal

func (a AttributeValue) BoolVal() bool

Value returns the bool value associated with this AttributeValue. If the Type() is not AttributeValueBOOL then return false. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) CopyTo

func (a AttributeValue) CopyTo(dest AttributeValue)

CopyTo copies all the fields from the given AttributeValue. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) DoubleVal

func (a AttributeValue) DoubleVal() float64

Value returns the float64 value associated with this AttributeValue. If the Type() is not AttributeValueDOUBLE then return float64(0). Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) Equal

func (a AttributeValue) Equal(av AttributeValue) bool

Equal checks for equality, it returns true if the objects are equal otherwise false.

func (AttributeValue) IntVal

func (a AttributeValue) IntVal() int64

Value returns the int64 value associated with this AttributeValue. If the Type() is not AttributeValueINT then return int64(0). Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) SetBoolVal

func (a AttributeValue) SetBoolVal(v bool)

SetBoolVal replaces the bool value associated with this AttributeValue, it also changes the type to be AttributeValueBOOL. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) SetDoubleVal

func (a AttributeValue) SetDoubleVal(v float64)

SetDoubleVal replaces the float64 value associated with this AttributeValue, it also changes the type to be AttributeValueDOUBLE. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) SetIntVal

func (a AttributeValue) SetIntVal(v int64)

SetIntVal replaces the int64 value associated with this AttributeValue, it also changes the type to be AttributeValueINT. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) SetStringVal

func (a AttributeValue) SetStringVal(v string)

SetStringVal replaces the string value associated with this AttributeValue, it also changes the type to be AttributeValueSTRING. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) StringVal

func (a AttributeValue) StringVal() string

Value returns the string value associated with this AttributeValue. If the Type() is not AttributeValueSTRING then return empty string. Calling this function on zero-initialized AttributeValue will cause a panic.

func (AttributeValue) Type

func (a AttributeValue) Type() AttributeValueType

Type returns the type of the value for this AttributeValue. Calling this function on zero-initialized AttributeValue will cause a panic.

type AttributeValueType

type AttributeValueType otlpcommon.AttributeKeyValue_ValueType

AttributeValueType specifies the type of value. Numerically is equal to otlp.AttributeKeyValue_ValueType.

func (AttributeValueType) String

func (avt AttributeValueType) String() string

type DoubleDataPoint

type DoubleDataPoint struct {
	// contains filtered or unexported fields
}

DoubleDataPoint is a single data point in a timeseries that describes the time-varying value of a double metric.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewDoubleDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

func NewDoubleDataPoint

func NewDoubleDataPoint() DoubleDataPoint

NewDoubleDataPoint creates a new "nil" DoubleDataPoint. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (DoubleDataPoint) CopyTo

func (ms DoubleDataPoint) CopyTo(dest DoubleDataPoint)

CopyTo copies all properties from the current struct to the dest.

func (DoubleDataPoint) InitEmpty

func (ms DoubleDataPoint) InitEmpty()

InitEmpty overwrites the current value with empty.

func (DoubleDataPoint) IsNil

func (ms DoubleDataPoint) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (DoubleDataPoint) LabelsMap

func (ms DoubleDataPoint) LabelsMap() StringMap

LabelsMap returns the Labels associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) SetStartTime

func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano)

SetStartTime replaces the starttime associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) SetTimestamp

func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) SetValue

func (ms DoubleDataPoint) SetValue(v float64)

SetValue replaces the value associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) StartTime

func (ms DoubleDataPoint) StartTime() TimestampUnixNano

StartTime returns the starttime associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) Timestamp

func (ms DoubleDataPoint) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (DoubleDataPoint) Value

func (ms DoubleDataPoint) Value() float64

Value returns the value associated with this DoubleDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

type DoubleDataPointSlice

type DoubleDataPointSlice struct {
	// contains filtered or unexported fields
}

DoubleDataPointSlice logically represents a slice of DoubleDataPoint.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewDoubleDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewDoubleDataPointSlice

func NewDoubleDataPointSlice() DoubleDataPointSlice

NewDoubleDataPointSlice creates a DoubleDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (DoubleDataPointSlice) At

func (es DoubleDataPointSlice) At(ix int) DoubleDataPoint

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (DoubleDataPointSlice) CopyTo

func (es DoubleDataPointSlice) CopyTo(dest DoubleDataPointSlice)

CopyTo copies all elements from the current slice to the dest.

func (DoubleDataPointSlice) Len

func (es DoubleDataPointSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewDoubleDataPointSlice()".

func (DoubleDataPointSlice) MoveAndAppendTo

func (es DoubleDataPointSlice) MoveAndAppendTo(dest DoubleDataPointSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (DoubleDataPointSlice) Resize

func (es DoubleDataPointSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new DoubleDataPointSlice can be initialized: es := NewDoubleDataPointSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type HistogramBucket

type HistogramBucket struct {
	// contains filtered or unexported fields
}

HistogramBucket contains values for a histogram bucket.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramBucket function to create new instances. Important: zero-initialized instance is not valid for use.

func NewHistogramBucket

func NewHistogramBucket() HistogramBucket

NewHistogramBucket creates a new "nil" HistogramBucket. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (HistogramBucket) CopyTo

func (ms HistogramBucket) CopyTo(dest HistogramBucket)

CopyTo copies all properties from the current struct to the dest.

func (HistogramBucket) Count

func (ms HistogramBucket) Count() uint64

Count returns the count associated with this HistogramBucket.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucket) Exemplar

func (ms HistogramBucket) Exemplar() HistogramBucketExemplar

Exemplar returns the exemplar associated with this HistogramBucket. If no exemplar available, it creates an empty message and associates it with this HistogramBucket.

Empty initialized HistogramBucket will return "nil" HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucket) InitEmpty

func (ms HistogramBucket) InitEmpty()

InitEmpty overwrites the current value with empty.

func (HistogramBucket) IsNil

func (ms HistogramBucket) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (HistogramBucket) SetCount

func (ms HistogramBucket) SetCount(v uint64)

SetCount replaces the count associated with this HistogramBucket.

Important: This causes a runtime error if IsNil() returns "true".

type HistogramBucketExemplar

type HistogramBucketExemplar struct {
	// contains filtered or unexported fields
}

HistogramBucketExemplar are example points that may be used to annotate aggregated Histogram values. They are metadata that gives information about a particular value added to a Histogram bucket.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramBucketExemplar function to create new instances. Important: zero-initialized instance is not valid for use.

func NewHistogramBucketExemplar

func NewHistogramBucketExemplar() HistogramBucketExemplar

NewHistogramBucketExemplar creates a new "nil" HistogramBucketExemplar. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (HistogramBucketExemplar) Attachments

func (ms HistogramBucketExemplar) Attachments() StringMap

Attachments returns the Attachments associated with this HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucketExemplar) CopyTo

func (ms HistogramBucketExemplar) CopyTo(dest HistogramBucketExemplar)

CopyTo copies all properties from the current struct to the dest.

func (HistogramBucketExemplar) InitEmpty

func (ms HistogramBucketExemplar) InitEmpty()

InitEmpty overwrites the current value with empty.

func (HistogramBucketExemplar) IsNil

func (ms HistogramBucketExemplar) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (HistogramBucketExemplar) SetTimestamp

func (ms HistogramBucketExemplar) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucketExemplar) SetValue

func (ms HistogramBucketExemplar) SetValue(v float64)

SetValue replaces the value associated with this HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucketExemplar) Timestamp

func (ms HistogramBucketExemplar) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramBucketExemplar) Value

func (ms HistogramBucketExemplar) Value() float64

Value returns the value associated with this HistogramBucketExemplar.

Important: This causes a runtime error if IsNil() returns "true".

type HistogramBucketSlice

type HistogramBucketSlice struct {
	// contains filtered or unexported fields
}

HistogramBucketSlice logically represents a slice of HistogramBucket.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramBucketSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewHistogramBucketSlice

func NewHistogramBucketSlice() HistogramBucketSlice

NewHistogramBucketSlice creates a HistogramBucketSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (HistogramBucketSlice) At

func (es HistogramBucketSlice) At(ix int) HistogramBucket

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (HistogramBucketSlice) CopyTo

func (es HistogramBucketSlice) CopyTo(dest HistogramBucketSlice)

CopyTo copies all elements from the current slice to the dest.

func (HistogramBucketSlice) Len

func (es HistogramBucketSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewHistogramBucketSlice()".

func (HistogramBucketSlice) MoveAndAppendTo

func (es HistogramBucketSlice) MoveAndAppendTo(dest HistogramBucketSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (HistogramBucketSlice) Resize

func (es HistogramBucketSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new HistogramBucketSlice can be initialized: es := NewHistogramBucketSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type HistogramDataPoint

type HistogramDataPoint struct {
	// contains filtered or unexported fields
}

HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

func NewHistogramDataPoint

func NewHistogramDataPoint() HistogramDataPoint

NewHistogramDataPoint creates a new "nil" HistogramDataPoint. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (HistogramDataPoint) Buckets

func (ms HistogramDataPoint) Buckets() HistogramBucketSlice

Buckets returns the Buckets associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) CopyTo

func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)

CopyTo copies all properties from the current struct to the dest.

func (HistogramDataPoint) Count

func (ms HistogramDataPoint) Count() uint64

Count returns the count associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) ExplicitBounds

func (ms HistogramDataPoint) ExplicitBounds() []float64

ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) InitEmpty

func (ms HistogramDataPoint) InitEmpty()

InitEmpty overwrites the current value with empty.

func (HistogramDataPoint) IsNil

func (ms HistogramDataPoint) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (HistogramDataPoint) LabelsMap

func (ms HistogramDataPoint) LabelsMap() StringMap

LabelsMap returns the Labels associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) SetCount

func (ms HistogramDataPoint) SetCount(v uint64)

SetCount replaces the count associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) SetExplicitBounds

func (ms HistogramDataPoint) SetExplicitBounds(v []float64)

SetExplicitBounds replaces the explicitbounds associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) SetStartTime

func (ms HistogramDataPoint) SetStartTime(v TimestampUnixNano)

SetStartTime replaces the starttime associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) SetSum

func (ms HistogramDataPoint) SetSum(v float64)

SetSum replaces the sum associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) SetTimestamp

func (ms HistogramDataPoint) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) StartTime

func (ms HistogramDataPoint) StartTime() TimestampUnixNano

StartTime returns the starttime associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) Sum

func (ms HistogramDataPoint) Sum() float64

Sum returns the sum associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (HistogramDataPoint) Timestamp

func (ms HistogramDataPoint) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this HistogramDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

type HistogramDataPointSlice

type HistogramDataPointSlice struct {
	// contains filtered or unexported fields
}

HistogramDataPointSlice logically represents a slice of HistogramDataPoint.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewHistogramDataPointSlice

func NewHistogramDataPointSlice() HistogramDataPointSlice

NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (HistogramDataPointSlice) At

func (es HistogramDataPointSlice) At(ix int) HistogramDataPoint

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (HistogramDataPointSlice) CopyTo

func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)

CopyTo copies all elements from the current slice to the dest.

func (HistogramDataPointSlice) Len

func (es HistogramDataPointSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewHistogramDataPointSlice()".

func (HistogramDataPointSlice) MoveAndAppendTo

func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (HistogramDataPointSlice) Resize

func (es HistogramDataPointSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new HistogramDataPointSlice can be initialized: es := NewHistogramDataPointSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type InstrumentationLibrary

type InstrumentationLibrary struct {
	// contains filtered or unexported fields
}

InstrumentationLibrary is a message representing the instrumentation library information.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInstrumentationLibrary function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInstrumentationLibrary

func NewInstrumentationLibrary() InstrumentationLibrary

NewInstrumentationLibrary creates a new "nil" InstrumentationLibrary. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (InstrumentationLibrary) CopyTo

func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)

CopyTo copies all properties from the current struct to the dest.

func (InstrumentationLibrary) InitEmpty

func (ms InstrumentationLibrary) InitEmpty()

InitEmpty overwrites the current value with empty.

func (InstrumentationLibrary) IsNil

func (ms InstrumentationLibrary) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (InstrumentationLibrary) Name

func (ms InstrumentationLibrary) Name() string

Name returns the name associated with this InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

func (InstrumentationLibrary) SetName

func (ms InstrumentationLibrary) SetName(v string)

SetName replaces the name associated with this InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

func (InstrumentationLibrary) SetVersion

func (ms InstrumentationLibrary) SetVersion(v string)

SetVersion replaces the version associated with this InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

func (InstrumentationLibrary) Version

func (ms InstrumentationLibrary) Version() string

Version returns the version associated with this InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

type InstrumentationLibraryMetrics

type InstrumentationLibraryMetrics struct {
	// contains filtered or unexported fields
}

InstrumentationLibraryMetrics is a collection of metrics from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInstrumentationLibraryMetrics function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInstrumentationLibraryMetrics

func NewInstrumentationLibraryMetrics() InstrumentationLibraryMetrics

NewInstrumentationLibraryMetrics creates a new "nil" InstrumentationLibraryMetrics. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (InstrumentationLibraryMetrics) CopyTo

func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)

CopyTo copies all properties from the current struct to the dest.

func (InstrumentationLibraryMetrics) InitEmpty

func (ms InstrumentationLibraryMetrics) InitEmpty()

InitEmpty overwrites the current value with empty.

func (InstrumentationLibraryMetrics) InstrumentationLibrary

func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary

InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryMetrics. If no instrumentationlibrary available, it creates an empty message and associates it with this InstrumentationLibraryMetrics.

Empty initialized InstrumentationLibraryMetrics will return "nil" InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

func (InstrumentationLibraryMetrics) IsNil

func (ms InstrumentationLibraryMetrics) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (InstrumentationLibraryMetrics) Metrics

func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice

Metrics returns the Metrics associated with this InstrumentationLibraryMetrics.

Important: This causes a runtime error if IsNil() returns "true".

type InstrumentationLibraryMetricsSlice

type InstrumentationLibraryMetricsSlice struct {
	// contains filtered or unexported fields
}

InstrumentationLibraryMetricsSlice logically represents a slice of InstrumentationLibraryMetrics.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInstrumentationLibraryMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInstrumentationLibraryMetricsSlice

func NewInstrumentationLibraryMetricsSlice() InstrumentationLibraryMetricsSlice

NewInstrumentationLibraryMetricsSlice creates a InstrumentationLibraryMetricsSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (InstrumentationLibraryMetricsSlice) At

func (es InstrumentationLibraryMetricsSlice) At(ix int) InstrumentationLibraryMetrics

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (InstrumentationLibraryMetricsSlice) CopyTo

func (es InstrumentationLibraryMetricsSlice) CopyTo(dest InstrumentationLibraryMetricsSlice)

CopyTo copies all elements from the current slice to the dest.

func (InstrumentationLibraryMetricsSlice) Len

func (es InstrumentationLibraryMetricsSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewInstrumentationLibraryMetricsSlice()".

func (InstrumentationLibraryMetricsSlice) MoveAndAppendTo

func (es InstrumentationLibraryMetricsSlice) MoveAndAppendTo(dest InstrumentationLibraryMetricsSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (InstrumentationLibraryMetricsSlice) Resize

func (es InstrumentationLibraryMetricsSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new InstrumentationLibraryMetricsSlice can be initialized: es := NewInstrumentationLibraryMetricsSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type InstrumentationLibrarySpans

type InstrumentationLibrarySpans struct {
	// contains filtered or unexported fields
}

InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInstrumentationLibrarySpans function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInstrumentationLibrarySpans

func NewInstrumentationLibrarySpans() InstrumentationLibrarySpans

NewInstrumentationLibrarySpans creates a new "nil" InstrumentationLibrarySpans. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (InstrumentationLibrarySpans) CopyTo

func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)

CopyTo copies all properties from the current struct to the dest.

func (InstrumentationLibrarySpans) InitEmpty

func (ms InstrumentationLibrarySpans) InitEmpty()

InitEmpty overwrites the current value with empty.

func (InstrumentationLibrarySpans) InstrumentationLibrary

func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary

InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibrarySpans. If no instrumentationlibrary available, it creates an empty message and associates it with this InstrumentationLibrarySpans.

Empty initialized InstrumentationLibrarySpans will return "nil" InstrumentationLibrary.

Important: This causes a runtime error if IsNil() returns "true".

func (InstrumentationLibrarySpans) IsNil

func (ms InstrumentationLibrarySpans) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (InstrumentationLibrarySpans) Spans

func (ms InstrumentationLibrarySpans) Spans() SpanSlice

Spans returns the Spans associated with this InstrumentationLibrarySpans.

Important: This causes a runtime error if IsNil() returns "true".

type InstrumentationLibrarySpansSlice

type InstrumentationLibrarySpansSlice struct {
	// contains filtered or unexported fields
}

InstrumentationLibrarySpansSlice logically represents a slice of InstrumentationLibrarySpans.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInstrumentationLibrarySpansSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInstrumentationLibrarySpansSlice

func NewInstrumentationLibrarySpansSlice() InstrumentationLibrarySpansSlice

NewInstrumentationLibrarySpansSlice creates a InstrumentationLibrarySpansSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (InstrumentationLibrarySpansSlice) At

func (es InstrumentationLibrarySpansSlice) At(ix int) InstrumentationLibrarySpans

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (InstrumentationLibrarySpansSlice) CopyTo

func (es InstrumentationLibrarySpansSlice) CopyTo(dest InstrumentationLibrarySpansSlice)

CopyTo copies all elements from the current slice to the dest.

func (InstrumentationLibrarySpansSlice) Len

func (es InstrumentationLibrarySpansSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewInstrumentationLibrarySpansSlice()".

func (InstrumentationLibrarySpansSlice) MoveAndAppendTo

func (es InstrumentationLibrarySpansSlice) MoveAndAppendTo(dest InstrumentationLibrarySpansSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (InstrumentationLibrarySpansSlice) Resize

func (es InstrumentationLibrarySpansSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new InstrumentationLibrarySpansSlice can be initialized: es := NewInstrumentationLibrarySpansSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type Int64DataPoint

type Int64DataPoint struct {
	// contains filtered or unexported fields
}

Int64DataPoint is a single data point in a timeseries that describes the time-varying values of a int64 metric.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInt64DataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInt64DataPoint

func NewInt64DataPoint() Int64DataPoint

NewInt64DataPoint creates a new "nil" Int64DataPoint. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (Int64DataPoint) CopyTo

func (ms Int64DataPoint) CopyTo(dest Int64DataPoint)

CopyTo copies all properties from the current struct to the dest.

func (Int64DataPoint) InitEmpty

func (ms Int64DataPoint) InitEmpty()

InitEmpty overwrites the current value with empty.

func (Int64DataPoint) IsNil

func (ms Int64DataPoint) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (Int64DataPoint) LabelsMap

func (ms Int64DataPoint) LabelsMap() StringMap

LabelsMap returns the Labels associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) SetStartTime

func (ms Int64DataPoint) SetStartTime(v TimestampUnixNano)

SetStartTime replaces the starttime associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) SetTimestamp

func (ms Int64DataPoint) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) SetValue

func (ms Int64DataPoint) SetValue(v int64)

SetValue replaces the value associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) StartTime

func (ms Int64DataPoint) StartTime() TimestampUnixNano

StartTime returns the starttime associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) Timestamp

func (ms Int64DataPoint) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (Int64DataPoint) Value

func (ms Int64DataPoint) Value() int64

Value returns the value associated with this Int64DataPoint.

Important: This causes a runtime error if IsNil() returns "true".

type Int64DataPointSlice

type Int64DataPointSlice struct {
	// contains filtered or unexported fields
}

Int64DataPointSlice logically represents a slice of Int64DataPoint.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewInt64DataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewInt64DataPointSlice

func NewInt64DataPointSlice() Int64DataPointSlice

NewInt64DataPointSlice creates a Int64DataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (Int64DataPointSlice) At

func (es Int64DataPointSlice) At(ix int) Int64DataPoint

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (Int64DataPointSlice) CopyTo

func (es Int64DataPointSlice) CopyTo(dest Int64DataPointSlice)

CopyTo copies all elements from the current slice to the dest.

func (Int64DataPointSlice) Len

func (es Int64DataPointSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewInt64DataPointSlice()".

func (Int64DataPointSlice) MoveAndAppendTo

func (es Int64DataPointSlice) MoveAndAppendTo(dest Int64DataPointSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (Int64DataPointSlice) Resize

func (es Int64DataPointSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new Int64DataPointSlice can be initialized: es := NewInt64DataPointSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type LogRecord

type LogRecord struct {
	// contains filtered or unexported fields
}

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLogRecord function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLogRecord

func NewLogRecord() LogRecord

NewLogRecord creates a new "nil" LogRecord. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (LogRecord) Attributes

func (ms LogRecord) Attributes() AttributeMap

Attributes returns the Attributes associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) Body

func (ms LogRecord) Body() string

Body returns the body associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) CopyTo

func (ms LogRecord) CopyTo(dest LogRecord)

CopyTo copies all properties from the current struct to the dest.

func (LogRecord) DroppedAttributesCount

func (ms LogRecord) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) Flags

func (ms LogRecord) Flags() uint32

Flags returns the flags associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) InitEmpty

func (ms LogRecord) InitEmpty()

InitEmpty overwrites the current value with empty.

func (LogRecord) IsNil

func (ms LogRecord) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (LogRecord) SetBody

func (ms LogRecord) SetBody(v string)

SetBody replaces the body associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetDroppedAttributesCount

func (ms LogRecord) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetFlags

func (ms LogRecord) SetFlags(v uint32)

SetFlags replaces the flags associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetSeverityNumber

func (ms LogRecord) SetSeverityNumber(v logsproto.SeverityNumber)

SetSeverityNumber replaces the severitynumber associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetSeverityText

func (ms LogRecord) SetSeverityText(v string)

SetSeverityText replaces the severitytext associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetShortName

func (ms LogRecord) SetShortName(v string)

SetShortName replaces the shortname associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetSpanID

func (ms LogRecord) SetSpanID(v SpanID)

SetSpanID replaces the spanid associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetTimestamp

func (ms LogRecord) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SetTraceID

func (ms LogRecord) SetTraceID(v TraceID)

SetTraceID replaces the traceid associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SeverityNumber

func (ms LogRecord) SeverityNumber() logsproto.SeverityNumber

SeverityNumber returns the severitynumber associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SeverityText

func (ms LogRecord) SeverityText() string

SeverityText returns the severitytext associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) ShortName

func (ms LogRecord) ShortName() string

ShortName returns the shortname associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) SpanID

func (ms LogRecord) SpanID() SpanID

SpanID returns the spanid associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) Timestamp

func (ms LogRecord) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

func (LogRecord) TraceID

func (ms LogRecord) TraceID() TraceID

TraceID returns the traceid associated with this LogRecord.

Important: This causes a runtime error if IsNil() returns "true".

type LogSlice

type LogSlice struct {
	// contains filtered or unexported fields
}

LogSlice logically represents a slice of LogRecord.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewLogSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewLogSlice

func NewLogSlice() LogSlice

NewLogSlice creates a LogSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (LogSlice) At

func (es LogSlice) At(ix int) LogRecord

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (LogSlice) CopyTo

func (es LogSlice) CopyTo(dest LogSlice)

CopyTo copies all elements from the current slice to the dest.

func (LogSlice) Len

func (es LogSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewLogSlice()".

func (LogSlice) MoveAndAppendTo

func (es LogSlice) MoveAndAppendTo(dest LogSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (LogSlice) Resize

func (es LogSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new LogSlice can be initialized: es := NewLogSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type Metric

type Metric struct {
	// contains filtered or unexported fields
}

Metric represents one metric as a collection of datapoints. See Metric definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/metrics/v1/metrics.proto#L96

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewMetric function to create new instances. Important: zero-initialized instance is not valid for use.

func NewMetric

func NewMetric() Metric

NewMetric creates a new "nil" Metric. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (Metric) CopyTo

func (ms Metric) CopyTo(dest Metric)

CopyTo copies all properties from the current struct to the dest.

func (Metric) DoubleDataPoints

func (ms Metric) DoubleDataPoints() DoubleDataPointSlice

DoubleDataPoints returns the DoubleDataPoints associated with this Metric.

Important: This causes a runtime error if IsNil() returns "true".

func (Metric) HistogramDataPoints

func (ms Metric) HistogramDataPoints() HistogramDataPointSlice

HistogramDataPoints returns the HistogramDataPoints associated with this Metric.

Important: This causes a runtime error if IsNil() returns "true".

func (Metric) InitEmpty

func (ms Metric) InitEmpty()

InitEmpty overwrites the current value with empty.

func (Metric) Int64DataPoints

func (ms Metric) Int64DataPoints() Int64DataPointSlice

Int64DataPoints returns the Int64DataPoints associated with this Metric.

Important: This causes a runtime error if IsNil() returns "true".

func (Metric) IsNil

func (ms Metric) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (Metric) MetricDescriptor

func (ms Metric) MetricDescriptor() MetricDescriptor

MetricDescriptor returns the metricdescriptor associated with this Metric. If no metricdescriptor available, it creates an empty message and associates it with this Metric.

Empty initialized Metric will return "nil" MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (Metric) SummaryDataPoints

func (ms Metric) SummaryDataPoints() SummaryDataPointSlice

SummaryDataPoints returns the SummaryDataPoints associated with this Metric.

Important: This causes a runtime error if IsNil() returns "true".

type MetricDescriptor

type MetricDescriptor struct {
	// contains filtered or unexported fields
}

MetricDescriptor is the descriptor of a metric.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewMetricDescriptor function to create new instances. Important: zero-initialized instance is not valid for use.

func NewMetricDescriptor

func NewMetricDescriptor() MetricDescriptor

NewMetricDescriptor creates a new "nil" MetricDescriptor. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (MetricDescriptor) CopyTo

func (ms MetricDescriptor) CopyTo(dest MetricDescriptor)

CopyTo copies all properties from the current struct to the dest.

func (MetricDescriptor) Description

func (ms MetricDescriptor) Description() string

Description returns the description associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) InitEmpty

func (ms MetricDescriptor) InitEmpty()

InitEmpty overwrites the current value with empty.

func (MetricDescriptor) IsNil

func (ms MetricDescriptor) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (MetricDescriptor) Name

func (ms MetricDescriptor) Name() string

Name returns the name associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) SetDescription

func (ms MetricDescriptor) SetDescription(v string)

SetDescription replaces the description associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) SetName

func (ms MetricDescriptor) SetName(v string)

SetName replaces the name associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) SetType

func (ms MetricDescriptor) SetType(v MetricType)

SetType replaces the type associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) SetUnit

func (ms MetricDescriptor) SetUnit(v string)

SetUnit replaces the unit associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) Type

func (ms MetricDescriptor) Type() MetricType

Type returns the type associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

func (MetricDescriptor) Unit

func (ms MetricDescriptor) Unit() string

Unit returns the unit associated with this MetricDescriptor.

Important: This causes a runtime error if IsNil() returns "true".

type MetricSlice

type MetricSlice struct {
	// contains filtered or unexported fields
}

MetricSlice logically represents a slice of Metric.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewMetricSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewMetricSlice

func NewMetricSlice() MetricSlice

NewMetricSlice creates a MetricSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (MetricSlice) At

func (es MetricSlice) At(ix int) Metric

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (MetricSlice) CopyTo

func (es MetricSlice) CopyTo(dest MetricSlice)

CopyTo copies all elements from the current slice to the dest.

func (MetricSlice) Len

func (es MetricSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewMetricSlice()".

func (MetricSlice) MoveAndAppendTo

func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (MetricSlice) Resize

func (es MetricSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new MetricSlice can be initialized: es := NewMetricSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type MetricType

type MetricType otlpmetrics.MetricDescriptor_Type

func (MetricType) String

func (mt MetricType) String() string

type Metrics

type Metrics struct {
	InternalOpaque interface{}
}

Metrics is an opaque interface that allows transition to the new internal Metrics data, but also facilitate the transition to the new components especially for traces.

Outside of the core repository the metrics pipeline cannot be converted to the new model since data.MetricData is part of the internal package.

IMPORTANT: Do not try to convert to/from this manually, use the helper functions in the pdatautil instead.

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource information.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResource function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResource

func NewResource() Resource

NewResource creates a new "nil" Resource. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (Resource) Attributes

func (ms Resource) Attributes() AttributeMap

Attributes returns the Attributes associated with this Resource.

Important: This causes a runtime error if IsNil() returns "true".

func (Resource) CopyTo

func (ms Resource) CopyTo(dest Resource)

CopyTo copies all properties from the current struct to the dest.

func (Resource) InitEmpty

func (ms Resource) InitEmpty()

InitEmpty overwrites the current value with empty.

func (Resource) IsNil

func (ms Resource) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

type ResourceLogs

type ResourceLogs struct {
	// contains filtered or unexported fields
}

ResourceLogs is a collection of logs from a Resource.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceLogs function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceLogs

func NewResourceLogs() ResourceLogs

NewResourceLogs creates a new "nil" ResourceLogs. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (ResourceLogs) CopyTo

func (ms ResourceLogs) CopyTo(dest ResourceLogs)

CopyTo copies all properties from the current struct to the dest.

func (ResourceLogs) InitEmpty

func (ms ResourceLogs) InitEmpty()

InitEmpty overwrites the current value with empty.

func (ResourceLogs) IsNil

func (ms ResourceLogs) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (ResourceLogs) Logs

func (ms ResourceLogs) Logs() LogSlice

Logs returns the Logs associated with this ResourceLogs.

Important: This causes a runtime error if IsNil() returns "true".

func (ResourceLogs) Resource

func (ms ResourceLogs) Resource() Resource

Resource returns the resource associated with this ResourceLogs. If no resource available, it creates an empty message and associates it with this ResourceLogs.

Empty initialized ResourceLogs will return "nil" Resource.

Important: This causes a runtime error if IsNil() returns "true".

type ResourceLogsSlice

type ResourceLogsSlice struct {
	// contains filtered or unexported fields
}

ResourceLogsSlice logically represents a slice of ResourceLogs.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceLogsSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceLogsSlice

func NewResourceLogsSlice() ResourceLogsSlice

NewResourceLogsSlice creates a ResourceLogsSlice with 0 elements. Can use "Resize" to initialize with a given length.

func NewResourceLogsSliceFromOrig

func NewResourceLogsSliceFromOrig(orig *[]*logsproto.ResourceLogs) ResourceLogsSlice

NewResourceLogsSliceFromOrig creates ResourceLogsSlice from logsproto.ResourceLogs. This function simply makes generated newResourceLogsSlice() function publicly available for internal.data.Log to call. We intentionally placed data.Log in the internal package so that it is not available publicly while it is experimental. Once the expriment is over data.Log should move to this package (pdata) and NewResourceLogsSliceFromOrig function will no longer be needed.

func (ResourceLogsSlice) At

func (es ResourceLogsSlice) At(ix int) ResourceLogs

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (ResourceLogsSlice) CopyTo

func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice)

CopyTo copies all elements from the current slice to the dest.

func (ResourceLogsSlice) Len

func (es ResourceLogsSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewResourceLogsSlice()".

func (ResourceLogsSlice) MoveAndAppendTo

func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ResourceLogsSlice) Resize

func (es ResourceLogsSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new ResourceLogsSlice can be initialized: es := NewResourceLogsSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type ResourceMetrics

type ResourceMetrics struct {
	// contains filtered or unexported fields
}

InstrumentationLibraryMetrics is a collection of metrics from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceMetrics function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceMetrics

func NewResourceMetrics() ResourceMetrics

NewResourceMetrics creates a new "nil" ResourceMetrics. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (ResourceMetrics) CopyTo

func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)

CopyTo copies all properties from the current struct to the dest.

func (ResourceMetrics) InitEmpty

func (ms ResourceMetrics) InitEmpty()

InitEmpty overwrites the current value with empty.

func (ResourceMetrics) InstrumentationLibraryMetrics

func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice

InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics.

Important: This causes a runtime error if IsNil() returns "true".

func (ResourceMetrics) IsNil

func (ms ResourceMetrics) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (ResourceMetrics) Resource

func (ms ResourceMetrics) Resource() Resource

Resource returns the resource associated with this ResourceMetrics. If no resource available, it creates an empty message and associates it with this ResourceMetrics.

Empty initialized ResourceMetrics will return "nil" Resource.

Important: This causes a runtime error if IsNil() returns "true".

type ResourceMetricsSlice

type ResourceMetricsSlice struct {
	// contains filtered or unexported fields
}

ResourceMetricsSlice logically represents a slice of ResourceMetrics.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func InternalNewMetricsResourceSlice

func InternalNewMetricsResourceSlice(orig *[]*otlpmetrics.ResourceMetrics) ResourceMetricsSlice

InternalNewMetricsResourceSlice is a helper

func NewResourceMetricsSlice

func NewResourceMetricsSlice() ResourceMetricsSlice

NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (ResourceMetricsSlice) At

func (es ResourceMetricsSlice) At(ix int) ResourceMetrics

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (ResourceMetricsSlice) CopyTo

func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)

CopyTo copies all elements from the current slice to the dest.

func (ResourceMetricsSlice) Len

func (es ResourceMetricsSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewResourceMetricsSlice()".

func (ResourceMetricsSlice) MoveAndAppendTo

func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ResourceMetricsSlice) Resize

func (es ResourceMetricsSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new ResourceMetricsSlice can be initialized: es := NewResourceMetricsSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type ResourceSpans

type ResourceSpans struct {
	// contains filtered or unexported fields
}

InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceSpans function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceSpans

func NewResourceSpans() ResourceSpans

NewResourceSpans creates a new "nil" ResourceSpans. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (ResourceSpans) CopyTo

func (ms ResourceSpans) CopyTo(dest ResourceSpans)

CopyTo copies all properties from the current struct to the dest.

func (ResourceSpans) InitEmpty

func (ms ResourceSpans) InitEmpty()

InitEmpty overwrites the current value with empty.

func (ResourceSpans) InstrumentationLibrarySpans

func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice

InstrumentationLibrarySpans returns the InstrumentationLibrarySpans associated with this ResourceSpans.

Important: This causes a runtime error if IsNil() returns "true".

func (ResourceSpans) IsNil

func (ms ResourceSpans) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (ResourceSpans) Resource

func (ms ResourceSpans) Resource() Resource

Resource returns the resource associated with this ResourceSpans. If no resource available, it creates an empty message and associates it with this ResourceSpans.

Empty initialized ResourceSpans will return "nil" Resource.

Important: This causes a runtime error if IsNil() returns "true".

type ResourceSpansSlice

type ResourceSpansSlice struct {
	// contains filtered or unexported fields
}

ResourceSpansSlice logically represents a slice of ResourceSpans.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewResourceSpansSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewResourceSpansSlice

func NewResourceSpansSlice() ResourceSpansSlice

NewResourceSpansSlice creates a ResourceSpansSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (ResourceSpansSlice) At

func (es ResourceSpansSlice) At(ix int) ResourceSpans

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (ResourceSpansSlice) CopyTo

func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice)

CopyTo copies all elements from the current slice to the dest.

func (ResourceSpansSlice) Len

func (es ResourceSpansSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewResourceSpansSlice()".

func (ResourceSpansSlice) MoveAndAppendTo

func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (ResourceSpansSlice) Resize

func (es ResourceSpansSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new ResourceSpansSlice can be initialized: es := NewResourceSpansSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type Span

type Span struct {
	// contains filtered or unexported fields
}

Span represents a single operation within a trace. See Span definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/trace/v1/trace.proto#L37

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpan function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpan

func NewSpan() Span

NewSpan creates a new "nil" Span. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (Span) Attributes

func (ms Span) Attributes() AttributeMap

Attributes returns the Attributes associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) CopyTo

func (ms Span) CopyTo(dest Span)

CopyTo copies all properties from the current struct to the dest.

func (Span) DroppedAttributesCount

func (ms Span) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) DroppedEventsCount

func (ms Span) DroppedEventsCount() uint32

DroppedEventsCount returns the droppedeventscount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) DroppedLinksCount

func (ms Span) DroppedLinksCount() uint32

DroppedLinksCount returns the droppedlinkscount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) EndTime

func (ms Span) EndTime() TimestampUnixNano

EndTime returns the endtime associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) Events

func (ms Span) Events() SpanEventSlice

Events returns the Events associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) InitEmpty

func (ms Span) InitEmpty()

InitEmpty overwrites the current value with empty.

func (Span) IsNil

func (ms Span) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (Span) Kind

func (ms Span) Kind() SpanKind

Kind returns the kind associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (ms Span) Links() SpanLinkSlice

Links returns the Links associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) Name

func (ms Span) Name() string

Name returns the name associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) ParentSpanID

func (ms Span) ParentSpanID() SpanID

ParentSpanID returns the parentspanid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetDroppedAttributesCount

func (ms Span) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetDroppedEventsCount

func (ms Span) SetDroppedEventsCount(v uint32)

SetDroppedEventsCount replaces the droppedeventscount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetDroppedLinksCount

func (ms Span) SetDroppedLinksCount(v uint32)

SetDroppedLinksCount replaces the droppedlinkscount associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetEndTime

func (ms Span) SetEndTime(v TimestampUnixNano)

SetEndTime replaces the endtime associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetKind

func (ms Span) SetKind(v SpanKind)

SetKind replaces the kind associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetName

func (ms Span) SetName(v string)

SetName replaces the name associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetParentSpanID

func (ms Span) SetParentSpanID(v SpanID)

SetParentSpanID replaces the parentspanid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetSpanID

func (ms Span) SetSpanID(v SpanID)

SetSpanID replaces the spanid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetStartTime

func (ms Span) SetStartTime(v TimestampUnixNano)

SetStartTime replaces the starttime associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetTraceID

func (ms Span) SetTraceID(v TraceID)

SetTraceID replaces the traceid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SetTraceState

func (ms Span) SetTraceState(v TraceState)

SetTraceState replaces the tracestate associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) SpanID

func (ms Span) SpanID() SpanID

SpanID returns the spanid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) StartTime

func (ms Span) StartTime() TimestampUnixNano

StartTime returns the starttime associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) Status

func (ms Span) Status() SpanStatus

Status returns the status associated with this Span. If no status available, it creates an empty message and associates it with this Span.

Empty initialized Span will return "nil" SpanStatus.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) TraceID

func (ms Span) TraceID() TraceID

TraceID returns the traceid associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

func (Span) TraceState

func (ms Span) TraceState() TraceState

TraceState returns the tracestate associated with this Span.

Important: This causes a runtime error if IsNil() returns "true".

type SpanEvent

type SpanEvent struct {
	// contains filtered or unexported fields
}

SpanEvent is a time-stamped annotation of the span, consisting of user-supplied text description and key-value pairs. See OTLP for event definition.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanEvent function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanEvent

func NewSpanEvent() SpanEvent

NewSpanEvent creates a new "nil" SpanEvent. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (SpanEvent) Attributes

func (ms SpanEvent) Attributes() AttributeMap

Attributes returns the Attributes associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) CopyTo

func (ms SpanEvent) CopyTo(dest SpanEvent)

CopyTo copies all properties from the current struct to the dest.

func (SpanEvent) DroppedAttributesCount

func (ms SpanEvent) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) InitEmpty

func (ms SpanEvent) InitEmpty()

InitEmpty overwrites the current value with empty.

func (SpanEvent) IsNil

func (ms SpanEvent) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (SpanEvent) Name

func (ms SpanEvent) Name() string

Name returns the name associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) SetDroppedAttributesCount

func (ms SpanEvent) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) SetName

func (ms SpanEvent) SetName(v string)

SetName replaces the name associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) SetTimestamp

func (ms SpanEvent) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanEvent) Timestamp

func (ms SpanEvent) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this SpanEvent.

Important: This causes a runtime error if IsNil() returns "true".

type SpanEventSlice

type SpanEventSlice struct {
	// contains filtered or unexported fields
}

SpanEventSlice logically represents a slice of SpanEvent.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanEventSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanEventSlice

func NewSpanEventSlice() SpanEventSlice

NewSpanEventSlice creates a SpanEventSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (SpanEventSlice) At

func (es SpanEventSlice) At(ix int) SpanEvent

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (SpanEventSlice) CopyTo

func (es SpanEventSlice) CopyTo(dest SpanEventSlice)

CopyTo copies all elements from the current slice to the dest.

func (SpanEventSlice) Len

func (es SpanEventSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSpanEventSlice()".

func (SpanEventSlice) MoveAndAppendTo

func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SpanEventSlice) Resize

func (es SpanEventSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new SpanEventSlice can be initialized: es := NewSpanEventSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type SpanID

type SpanID []byte

func NewSpanID

func NewSpanID(bytes []byte) SpanID

NewSpanID returns a new SpanID.

func (SpanID) Bytes

func (s SpanID) Bytes() []byte

func (SpanID) String

func (s SpanID) String() string

type SpanKind

type SpanKind otlptrace.Span_SpanKind

func (SpanKind) String

func (sk SpanKind) String() string
type SpanLink struct {
	// contains filtered or unexported fields
}

SpanLink is a pointer from the current span to another span in the same trace or in a different trace. See OTLP for link definition.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanLink function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanLink() SpanLink

NewSpanLink creates a new "nil" SpanLink. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (SpanLink) Attributes

func (ms SpanLink) Attributes() AttributeMap

Attributes returns the Attributes associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) CopyTo

func (ms SpanLink) CopyTo(dest SpanLink)

CopyTo copies all properties from the current struct to the dest.

func (SpanLink) DroppedAttributesCount

func (ms SpanLink) DroppedAttributesCount() uint32

DroppedAttributesCount returns the droppedattributescount associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) InitEmpty

func (ms SpanLink) InitEmpty()

InitEmpty overwrites the current value with empty.

func (SpanLink) IsNil

func (ms SpanLink) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (SpanLink) SetDroppedAttributesCount

func (ms SpanLink) SetDroppedAttributesCount(v uint32)

SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) SetSpanID

func (ms SpanLink) SetSpanID(v SpanID)

SetSpanID replaces the spanid associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) SetTraceID

func (ms SpanLink) SetTraceID(v TraceID)

SetTraceID replaces the traceid associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) SetTraceState

func (ms SpanLink) SetTraceState(v TraceState)

SetTraceState replaces the tracestate associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) SpanID

func (ms SpanLink) SpanID() SpanID

SpanID returns the spanid associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) TraceID

func (ms SpanLink) TraceID() TraceID

TraceID returns the traceid associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanLink) TraceState

func (ms SpanLink) TraceState() TraceState

TraceState returns the tracestate associated with this SpanLink.

Important: This causes a runtime error if IsNil() returns "true".

type SpanLinkSlice

type SpanLinkSlice struct {
	// contains filtered or unexported fields
}

SpanLinkSlice logically represents a slice of SpanLink.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanLinkSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanLinkSlice

func NewSpanLinkSlice() SpanLinkSlice

NewSpanLinkSlice creates a SpanLinkSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (SpanLinkSlice) At

func (es SpanLinkSlice) At(ix int) SpanLink

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (SpanLinkSlice) CopyTo

func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice)

CopyTo copies all elements from the current slice to the dest.

func (SpanLinkSlice) Len

func (es SpanLinkSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSpanLinkSlice()".

func (SpanLinkSlice) MoveAndAppendTo

func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SpanLinkSlice) Resize

func (es SpanLinkSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new SpanLinkSlice can be initialized: es := NewSpanLinkSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type SpanSlice

type SpanSlice struct {
	// contains filtered or unexported fields
}

SpanSlice logically represents a slice of Span.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanSlice

func NewSpanSlice() SpanSlice

NewSpanSlice creates a SpanSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (SpanSlice) At

func (es SpanSlice) At(ix int) Span

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (SpanSlice) CopyTo

func (es SpanSlice) CopyTo(dest SpanSlice)

CopyTo copies all elements from the current slice to the dest.

func (SpanSlice) Len

func (es SpanSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSpanSlice()".

func (SpanSlice) MoveAndAppendTo

func (es SpanSlice) MoveAndAppendTo(dest SpanSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SpanSlice) Resize

func (es SpanSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new SpanSlice can be initialized: es := NewSpanSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type SpanStatus

type SpanStatus struct {
	// contains filtered or unexported fields
}

SpanStatus is an optional final status for this span. Semantically when Status wasn't set it is means span ended without errors and assume Status.Ok (code = 0).

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSpanStatus function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSpanStatus

func NewSpanStatus() SpanStatus

NewSpanStatus creates a new "nil" SpanStatus. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (SpanStatus) Code

func (ms SpanStatus) Code() StatusCode

Code returns the code associated with this SpanStatus.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanStatus) CopyTo

func (ms SpanStatus) CopyTo(dest SpanStatus)

CopyTo copies all properties from the current struct to the dest.

func (SpanStatus) InitEmpty

func (ms SpanStatus) InitEmpty()

InitEmpty overwrites the current value with empty.

func (SpanStatus) IsNil

func (ms SpanStatus) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (SpanStatus) Message

func (ms SpanStatus) Message() string

Message returns the message associated with this SpanStatus.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanStatus) SetCode

func (ms SpanStatus) SetCode(v StatusCode)

SetCode replaces the code associated with this SpanStatus.

Important: This causes a runtime error if IsNil() returns "true".

func (SpanStatus) SetMessage

func (ms SpanStatus) SetMessage(v string)

SetMessage replaces the message associated with this SpanStatus.

Important: This causes a runtime error if IsNil() returns "true".

type StringMap

type StringMap struct {
	// contains filtered or unexported fields
}

StringMap stores a map of attribute keys to values.

func NewStringMap

func NewStringMap() StringMap

NewStringMap creates a StringMap with 0 elements.

func (StringMap) CopyTo

func (sm StringMap) CopyTo(dest StringMap)

CopyTo copies all elements from the current map to the dest.

func (StringMap) Delete

func (sm StringMap) Delete(k string) bool

Delete deletes the entry associated with the key and returns true if the key was present in the map, otherwise returns false.

func (StringMap) ForEach

func (sm StringMap) ForEach(f func(k string, v StringValue))

ForEach iterates over the every elements in the map by calling the provided func.

Example:

it := sm.ForEach(func(k string, v StringValue) {

...

})

func (StringMap) Get

func (sm StringMap) Get(k string) (StringValue, bool)

Get returns the StringValue associated with the key and true, otherwise an invalid instance of the StringKeyValue and false. Calling any functions on the returned invalid instance will cause a panic.

func (StringMap) InitEmptyWithCapacity

func (sm StringMap) InitEmptyWithCapacity(cap int)

InitEmptyWithCapacity constructs an empty StringMap with predefined slice capacity.

func (StringMap) InitFromMap

func (sm StringMap) InitFromMap(attrMap map[string]string) StringMap

InitFromMap overwrites the entire StringMap and reconstructs the StringMap with values from the given map[string]string.

Returns the same instance to allow nicer code like: assert.EqualValues(t, NewStringMap().InitFromMap(map[string]string{...}), actual)

func (StringMap) Insert

func (sm StringMap) Insert(k, v string)

Insert adds the string value to the map when the key does not exist. No action is applied to the map where the key already exists.

func (StringMap) Len

func (sm StringMap) Len() int

Len returns the length of this map.

Because the AttributeMap is represented internally by a slice of pointers, and the data are comping from the wire, it is possible that when iterating using "ForEach" to get access to fewer elements because nil elements are skipped.

func (StringMap) Sort

func (sm StringMap) Sort() StringMap

Sort sorts the entries in the StringMap so two instances can be compared. Returns the same instance to allow nicer code like: assert.EqualValues(t, expected.Sort(), actual.Sort())

func (StringMap) Update

func (sm StringMap) Update(k, v string)

Update updates an existing string value with a value. No action is applied to the map where the key does not exist.

func (StringMap) Upsert

func (sm StringMap) Upsert(k, v string)

Upsert performs the Insert or Update action. The string value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.

type StringValue

type StringValue struct {
	// contains filtered or unexported fields
}

StringValue stores a string value.

Intended to be passed by value since internally it is just a pointer to actual value representation. For the same reason passing by value and calling setters will modify the original, e.g.:

function f1(val StringValue) { val.SetValue("1234") }
function f2() {
	v := NewStringKeyValue("key", "a string")
   f1(v)
   _ := v.Value() // this will return "1234"
}

func (StringValue) SetValue

func (akv StringValue) SetValue(v string)

SetValue replaces the value associated with this StringValue. Calling this function on zero-initialized StringValue will cause a panic.

func (StringValue) Value

func (akv StringValue) Value() string

Value returns the value associated with this StringValue. Calling this function on zero-initialized StringValue will cause a panic.

type SummaryDataPoint

type SummaryDataPoint struct {
	// contains filtered or unexported fields
}

SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary metric.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummaryDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSummaryDataPoint

func NewSummaryDataPoint() SummaryDataPoint

NewSummaryDataPoint creates a new "nil" SummaryDataPoint. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (SummaryDataPoint) CopyTo

func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)

CopyTo copies all properties from the current struct to the dest.

func (SummaryDataPoint) Count

func (ms SummaryDataPoint) Count() uint64

Count returns the count associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) InitEmpty

func (ms SummaryDataPoint) InitEmpty()

InitEmpty overwrites the current value with empty.

func (SummaryDataPoint) IsNil

func (ms SummaryDataPoint) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (SummaryDataPoint) LabelsMap

func (ms SummaryDataPoint) LabelsMap() StringMap

LabelsMap returns the Labels associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) SetCount

func (ms SummaryDataPoint) SetCount(v uint64)

SetCount replaces the count associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) SetStartTime

func (ms SummaryDataPoint) SetStartTime(v TimestampUnixNano)

SetStartTime replaces the starttime associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) SetSum

func (ms SummaryDataPoint) SetSum(v float64)

SetSum replaces the sum associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) SetTimestamp

func (ms SummaryDataPoint) SetTimestamp(v TimestampUnixNano)

SetTimestamp replaces the timestamp associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) StartTime

func (ms SummaryDataPoint) StartTime() TimestampUnixNano

StartTime returns the starttime associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) Sum

func (ms SummaryDataPoint) Sum() float64

Sum returns the sum associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) Timestamp

func (ms SummaryDataPoint) Timestamp() TimestampUnixNano

Timestamp returns the timestamp associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryDataPoint) ValueAtPercentiles

func (ms SummaryDataPoint) ValueAtPercentiles() SummaryValueAtPercentileSlice

ValueAtPercentiles returns the PercentileValues associated with this SummaryDataPoint.

Important: This causes a runtime error if IsNil() returns "true".

type SummaryDataPointSlice

type SummaryDataPointSlice struct {
	// contains filtered or unexported fields
}

SummaryDataPointSlice logically represents a slice of SummaryDataPoint.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummaryDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSummaryDataPointSlice

func NewSummaryDataPointSlice() SummaryDataPointSlice

NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (SummaryDataPointSlice) At

func (es SummaryDataPointSlice) At(ix int) SummaryDataPoint

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (SummaryDataPointSlice) CopyTo

func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)

CopyTo copies all elements from the current slice to the dest.

func (SummaryDataPointSlice) Len

func (es SummaryDataPointSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSummaryDataPointSlice()".

func (SummaryDataPointSlice) MoveAndAppendTo

func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SummaryDataPointSlice) Resize

func (es SummaryDataPointSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new SummaryDataPointSlice can be initialized: es := NewSummaryDataPointSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type SummaryValueAtPercentile

type SummaryValueAtPercentile struct {
	// contains filtered or unexported fields
}

SummaryValueAtPercentile represents the value at a given percentile of a distribution.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummaryValueAtPercentile function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSummaryValueAtPercentile

func NewSummaryValueAtPercentile() SummaryValueAtPercentile

NewSummaryValueAtPercentile creates a new "nil" SummaryValueAtPercentile. To initialize the struct call "InitEmpty".

This must be used only in testing code since no "Set" method available.

func (SummaryValueAtPercentile) CopyTo

func (ms SummaryValueAtPercentile) CopyTo(dest SummaryValueAtPercentile)

CopyTo copies all properties from the current struct to the dest.

func (SummaryValueAtPercentile) InitEmpty

func (ms SummaryValueAtPercentile) InitEmpty()

InitEmpty overwrites the current value with empty.

func (SummaryValueAtPercentile) IsNil

func (ms SummaryValueAtPercentile) IsNil() bool

IsNil returns true if the underlying data are nil.

Important: All other functions will cause a runtime error if this returns "true".

func (SummaryValueAtPercentile) Percentile

func (ms SummaryValueAtPercentile) Percentile() float64

Percentile returns the percentile associated with this SummaryValueAtPercentile.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryValueAtPercentile) SetPercentile

func (ms SummaryValueAtPercentile) SetPercentile(v float64)

SetPercentile replaces the percentile associated with this SummaryValueAtPercentile.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryValueAtPercentile) SetValue

func (ms SummaryValueAtPercentile) SetValue(v float64)

SetValue replaces the value associated with this SummaryValueAtPercentile.

Important: This causes a runtime error if IsNil() returns "true".

func (SummaryValueAtPercentile) Value

func (ms SummaryValueAtPercentile) Value() float64

Value returns the value associated with this SummaryValueAtPercentile.

Important: This causes a runtime error if IsNil() returns "true".

type SummaryValueAtPercentileSlice

type SummaryValueAtPercentileSlice struct {
	// contains filtered or unexported fields
}

SummaryValueAtPercentileSlice logically represents a slice of SummaryValueAtPercentile.

This is a reference type, if passed by value and callee modifies it the caller will see the modification.

Must use NewSummaryValueAtPercentileSlice function to create new instances. Important: zero-initialized instance is not valid for use.

func NewSummaryValueAtPercentileSlice

func NewSummaryValueAtPercentileSlice() SummaryValueAtPercentileSlice

NewSummaryValueAtPercentileSlice creates a SummaryValueAtPercentileSlice with 0 elements. Can use "Resize" to initialize with a given length.

func (SummaryValueAtPercentileSlice) At

func (es SummaryValueAtPercentileSlice) At(ix int) SummaryValueAtPercentile

At returns the element at the given index.

This function is used mostly for iterating over all the values in the slice: for i := 0; i < es.Len(); i++ {

e := es.At(i)
... // Do something with the element

}

func (SummaryValueAtPercentileSlice) CopyTo

func (es SummaryValueAtPercentileSlice) CopyTo(dest SummaryValueAtPercentileSlice)

CopyTo copies all elements from the current slice to the dest.

func (SummaryValueAtPercentileSlice) Len

func (es SummaryValueAtPercentileSlice) Len() int

Len returns the number of elements in the slice.

Returns "0" for a newly instance created with "NewSummaryValueAtPercentileSlice()".

func (SummaryValueAtPercentileSlice) MoveAndAppendTo

func (es SummaryValueAtPercentileSlice) MoveAndAppendTo(dest SummaryValueAtPercentileSlice)

MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.

func (SummaryValueAtPercentileSlice) Resize

func (es SummaryValueAtPercentileSlice) Resize(newLen int)

Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.

Here is how a new SummaryValueAtPercentileSlice can be initialized: es := NewSummaryValueAtPercentileSlice() es.Resize(4) for i := 0; i < es.Len(); i++ {

e := es.At(i)
// Here should set all the values for e.

}

type TimestampUnixNano

type TimestampUnixNano uint64

TimestampUnixNano is a time specified as UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

func (TimestampUnixNano) String

func (ts TimestampUnixNano) String() string

type TraceID

type TraceID []byte

func NewTraceID

func NewTraceID(bytes []byte) TraceID

NewTraceID returns a new TraceID.

func (TraceID) Bytes

func (t TraceID) Bytes() []byte

func (TraceID) String

func (t TraceID) String() string

type TraceState

type TraceState string

TraceState in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header

type Traces

type Traces struct {
	// contains filtered or unexported fields
}

Traces is the top-level struct that is propagated through the traces pipeline. This is the newer version of consumerdata.Traces, but uses more efficient in-memory representation.

func NewTraces

func NewTraces() Traces

NewTraces creates a new Traces.

func TracesFromOtlp

func TracesFromOtlp(orig []*otlptrace.ResourceSpans) Traces

TracesFromOtlp creates the internal Traces representation from the OTLP.

func (Traces) Clone

func (td Traces) Clone() Traces

Clone returns a copy of Traces.

func (Traces) ResourceSpans

func (td Traces) ResourceSpans() ResourceSpansSlice

func (Traces) SpanCount

func (td Traces) SpanCount() int

SpanCount calculates the total number of spans.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier