Documentation ¶
Overview ¶
Package 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. The package is placed in "internal" for now since it is incubating and may undergoe changes as we iterate and improve it. Once it is stable we will move it to an exported location so that other components outside this module can use it.
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 ¶
- func MetricDataToOtlp(md MetricData) []*otlpmetrics.ResourceMetrics
- type AttributeKeyValue
- func NewAttributeKeyValue(k string) AttributeKeyValue
- func NewAttributeKeyValueBool(k string, v bool) AttributeKeyValue
- func NewAttributeKeyValueDouble(k string, v float64) AttributeKeyValue
- func NewAttributeKeyValueInt(k string, v int64) AttributeKeyValue
- func NewAttributeKeyValueString(k string, v string) AttributeKeyValue
- type AttributeMap
- func (am AttributeMap) Delete(key string) bool
- func (am AttributeMap) Get(key string) (AttributeKeyValue, bool)
- func (am AttributeMap) GetAttribute(ix int) AttributeKeyValue
- func (am AttributeMap) Insert(akv AttributeKeyValue)
- func (am AttributeMap) Len() int
- func (am AttributeMap) Sort() AttributeMap
- func (am AttributeMap) Update(akv AttributeKeyValue)
- func (am AttributeMap) Upsert(akv AttributeKeyValue)
- type AttributeValue
- func (a AttributeValue) BoolVal() bool
- func (a AttributeValue) DoubleVal() float64
- func (a AttributeValue) IntVal() int64
- func (a AttributeValue) SetBool(v bool)
- func (a AttributeValue) SetDouble(v float64)
- func (a AttributeValue) SetInt(v int64)
- func (a AttributeValue) SetString(v string)
- func (a AttributeValue) StringVal() string
- func (a AttributeValue) Type() AttributeValueType
- type AttributeValueType
- type AttributesMap
- type DoubleDataPoint
- func (ms DoubleDataPoint) LabelsMap() StringMap
- func (ms DoubleDataPoint) SetLabelsMap(v StringMap)
- func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms DoubleDataPoint) SetValue(v float64)
- func (ms DoubleDataPoint) StartTime() TimestampUnixNano
- func (ms DoubleDataPoint) Timestamp() TimestampUnixNano
- func (ms DoubleDataPoint) Value() float64
- type DoubleDataPointSlice
- type HistogramBucket
- type HistogramBucketExemplar
- func (ms HistogramBucketExemplar) Attachments() StringMap
- func (ms HistogramBucketExemplar) SetAttachments(v StringMap)
- func (ms HistogramBucketExemplar) SetTimestamp(v TimestampUnixNano)
- func (ms HistogramBucketExemplar) SetValue(v float64)
- func (ms HistogramBucketExemplar) Timestamp() TimestampUnixNano
- func (ms HistogramBucketExemplar) Value() float64
- type HistogramBucketSlice
- type HistogramDataPoint
- func (ms HistogramDataPoint) Buckets() HistogramBucketSlice
- func (ms HistogramDataPoint) Count() uint64
- func (ms HistogramDataPoint) ExplicitBounds() []float64
- func (ms HistogramDataPoint) LabelsMap() StringMap
- func (ms HistogramDataPoint) SetBuckets(v HistogramBucketSlice)
- func (ms HistogramDataPoint) SetCount(v uint64)
- func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
- func (ms HistogramDataPoint) SetLabelsMap(v StringMap)
- func (ms HistogramDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms HistogramDataPoint) SetSum(v float64)
- func (ms HistogramDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms HistogramDataPoint) StartTime() TimestampUnixNano
- func (ms HistogramDataPoint) Sum() float64
- func (ms HistogramDataPoint) Timestamp() TimestampUnixNano
- type HistogramDataPointSlice
- type InstrumentationLibrary
- type InstrumentationLibraryMetrics
- func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice
- func (ms InstrumentationLibraryMetrics) SetInstrumentationLibrary(v InstrumentationLibrary)
- func (ms InstrumentationLibraryMetrics) SetMetrics(v MetricSlice)
- type InstrumentationLibraryMetricsSlice
- type InstrumentationLibrarySpans
- type Int64DataPoint
- func (ms Int64DataPoint) LabelsMap() StringMap
- func (ms Int64DataPoint) SetLabelsMap(v StringMap)
- func (ms Int64DataPoint) SetStartTime(v TimestampUnixNano)
- func (ms Int64DataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms Int64DataPoint) SetValue(v int64)
- func (ms Int64DataPoint) StartTime() TimestampUnixNano
- func (ms Int64DataPoint) Timestamp() TimestampUnixNano
- func (ms Int64DataPoint) Value() int64
- type Int64DataPointSlice
- type Metric
- func (ms Metric) DoubleDataPoints() DoubleDataPointSlice
- func (ms Metric) HistogramDataPoints() HistogramDataPointSlice
- func (ms Metric) Int64DataPoints() Int64DataPointSlice
- func (ms Metric) MetricDescriptor() MetricDescriptor
- func (ms Metric) SetDoubleDataPoints(v DoubleDataPointSlice)
- func (ms Metric) SetHistogramDataPoints(v HistogramDataPointSlice)
- func (ms Metric) SetInt64DataPoints(v Int64DataPointSlice)
- func (ms Metric) SetMetricDescriptor(v MetricDescriptor)
- func (ms Metric) SetSummaryDataPoints(v SummaryDataPointSlice)
- func (ms Metric) SummaryDataPoints() SummaryDataPointSlice
- type MetricData
- type MetricDescriptor
- func (ms MetricDescriptor) Description() string
- func (ms MetricDescriptor) LabelsMap() StringMap
- func (ms MetricDescriptor) Name() string
- func (ms MetricDescriptor) SetDescription(v string)
- func (ms MetricDescriptor) SetLabelsMap(v StringMap)
- func (ms MetricDescriptor) SetName(v string)
- func (ms MetricDescriptor) SetType(v MetricType)
- func (ms MetricDescriptor) SetUnit(v string)
- func (ms MetricDescriptor) Type() MetricType
- func (ms MetricDescriptor) Unit() string
- type MetricSlice
- type MetricType
- type Resource
- type ResourceMetrics
- type ResourceMetricsSlice
- type ResourceSpans
- type Span
- func (ms Span) Attributes() AttributeMap
- func (ms Span) DroppedAttributesCount() uint32
- func (ms Span) DroppedEventsCount() uint32
- func (ms Span) DroppedLinksCount() uint32
- func (ms Span) EndTime() TimestampUnixNano
- func (ms Span) Events() SpanEventSlice
- func (ms Span) Kind() SpanKind
- func (ms Span) Links() SpanLinkSlice
- func (ms Span) Name() string
- func (ms Span) ParentSpanID() SpanID
- func (ms Span) SetAttributes(v AttributeMap)
- func (ms Span) SetDroppedAttributesCount(v uint32)
- func (ms Span) SetDroppedEventsCount(v uint32)
- func (ms Span) SetDroppedLinksCount(v uint32)
- func (ms Span) SetEndTime(v TimestampUnixNano)
- func (ms Span) SetEvents(v SpanEventSlice)
- func (ms Span) SetKind(v SpanKind)
- func (ms Span) SetLinks(v SpanLinkSlice)
- func (ms Span) SetName(v string)
- func (ms Span) SetParentSpanID(v SpanID)
- func (ms Span) SetSpanID(v SpanID)
- func (ms Span) SetStartTime(v TimestampUnixNano)
- func (ms Span) SetStatus(v SpanStatus)
- func (ms Span) SetTraceID(v TraceID)
- func (ms Span) SetTraceState(v TraceState)
- func (ms Span) SpanID() SpanID
- func (ms Span) StartTime() TimestampUnixNano
- func (ms Span) Status() SpanStatus
- func (ms Span) TraceID() TraceID
- func (ms Span) TraceState() TraceState
- type SpanEvent
- func (ms SpanEvent) Attributes() AttributeMap
- func (ms SpanEvent) DroppedAttributesCount() uint32
- func (ms SpanEvent) Name() string
- func (ms SpanEvent) SetAttributes(v AttributeMap)
- func (ms SpanEvent) SetDroppedAttributesCount(v uint32)
- func (ms SpanEvent) SetName(v string)
- func (ms SpanEvent) SetTimestamp(v TimestampUnixNano)
- func (ms SpanEvent) Timestamp() TimestampUnixNano
- type SpanEventSlice
- type SpanID
- type SpanKind
- type SpanLink
- func (ms SpanLink) Attributes() AttributeMap
- func (ms SpanLink) DroppedAttributesCount() uint32
- func (ms SpanLink) SetAttributes(v AttributeMap)
- func (ms SpanLink) SetDroppedAttributesCount(v uint32)
- func (ms SpanLink) SetSpanID(v SpanID)
- func (ms SpanLink) SetTraceID(v TraceID)
- func (ms SpanLink) SetTraceState(v TraceState)
- func (ms SpanLink) SpanID() SpanID
- func (ms SpanLink) TraceID() TraceID
- func (ms SpanLink) TraceState() TraceState
- type SpanLinkSlice
- type SpanStatus
- type StatusCode
- type StringKeyValue
- type StringMap
- func (sm StringMap) Delete(k string) bool
- func (sm StringMap) Get(k string) (StringKeyValue, bool)
- func (sm StringMap) GetStringKeyValue(ix int) StringKeyValue
- func (sm StringMap) Insert(k, v string)
- func (sm StringMap) Len() int
- func (sm StringMap) Sort() StringMap
- func (sm StringMap) Update(k, v string)
- func (sm StringMap) Upsert(k, v string)
- type SummaryDataPoint
- func (ms SummaryDataPoint) Count() uint64
- func (ms SummaryDataPoint) LabelsMap() StringMap
- func (ms SummaryDataPoint) SetCount(v uint64)
- func (ms SummaryDataPoint) SetLabelsMap(v StringMap)
- func (ms SummaryDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms SummaryDataPoint) SetSum(v float64)
- func (ms SummaryDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms SummaryDataPoint) SetValueAtPercentiles(v SummaryValueAtPercentileSlice)
- func (ms SummaryDataPoint) StartTime() TimestampUnixNano
- func (ms SummaryDataPoint) Sum() float64
- func (ms SummaryDataPoint) Timestamp() TimestampUnixNano
- func (ms SummaryDataPoint) ValueAtPercentiles() SummaryValueAtPercentileSlice
- type SummaryDataPointSlice
- type SummaryValueAtPercentile
- type SummaryValueAtPercentileSlice
- type TimestampUnixNano
- type TraceData
- type TraceID
- type TraceState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricDataToOtlp ¶
func MetricDataToOtlp(md MetricData) []*otlpmetrics.ResourceMetrics
MetricDataToOtlp converts the internal MetricData to the OTLP.
Types ¶
type AttributeKeyValue ¶ added in v0.2.8
type AttributeKeyValue struct {
// contains filtered or unexported fields
}
AttributeKeyValue stores a key and AttributeValue pair.
func NewAttributeKeyValue ¶ added in v0.2.8
func NewAttributeKeyValue(k string) AttributeKeyValue
NewAttributeKeyValue creates a new AttributeKeyValue with the given key.
func NewAttributeKeyValueBool ¶ added in v0.2.8
func NewAttributeKeyValueBool(k string, v bool) AttributeKeyValue
NewAttributeKeyValueBool creates a new AttributeKeyValue with the given key and bool value.
func NewAttributeKeyValueDouble ¶ added in v0.2.8
func NewAttributeKeyValueDouble(k string, v float64) AttributeKeyValue
NewAttributeKeyValueDouble creates a new AttributeKeyValue with the given key and float64 value.
func NewAttributeKeyValueInt ¶ added in v0.2.8
func NewAttributeKeyValueInt(k string, v int64) AttributeKeyValue
NewAttributeKeyValueInt creates a new AttributeKeyValue with the given key and int64 value.
func NewAttributeKeyValueString ¶ added in v0.2.8
func NewAttributeKeyValueString(k string, v string) AttributeKeyValue
NewAttributeKeyValueString creates a new AttributeKeyValue with the given key and string value.
func (AttributeKeyValue) Key ¶ added in v0.2.8
func (akv AttributeKeyValue) Key() string
Key returns the key associated with this AttributeKeyValue.
func (AttributeKeyValue) SetValue ¶ added in v0.2.8
func (akv AttributeKeyValue) SetValue(av AttributeValue)
SetValue replaces the value associated with this AttributeKeyValue.
func (AttributeKeyValue) Value ¶ added in v0.2.8
func (akv AttributeKeyValue) Value() AttributeValue
Value returns the value associated with this AttributeKeyValue.
type AttributeMap ¶ added in v0.2.8
type AttributeMap struct {
// contains filtered or unexported fields
}
AttributeMap stores a map of attribute keys to values.
func NewAttributeMap ¶ added in v0.2.8
func NewAttributeMap(attrMap map[string]AttributeValue) AttributeMap
NewAttributeMap creates a new AttributeMap from the given map[string]AttributeValue.
func (AttributeMap) Delete ¶ added in v0.2.8
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) Get ¶ added in v0.2.8
func (am AttributeMap) Get(key string) (AttributeKeyValue, bool)
Get returns the AttributeKeyValue associated with the key and true, otherwise an invalid instance of the AttributeKeyValue and false.
func (AttributeMap) GetAttribute ¶ added in v0.2.8
func (am AttributeMap) GetAttribute(ix int) AttributeKeyValue
GetAttribute returns the AttributeKeyValue associated with the given index.
This function is used mostly for itereting over all the values in the map:
for i := 1; i < am.Len(); i++ { akv := am.GetAttribute(i) ... // Do something with the attribute }
func (AttributeMap) Insert ¶ added in v0.2.8
func (am AttributeMap) Insert(akv AttributeKeyValue)
Insert adds the AttributeKeyValue to the map when the key does not exist. No action is applied to the map where the key already exists.
func (AttributeMap) Len ¶ added in v0.2.8
func (am AttributeMap) Len() int
Len returns the number of AttributeKeyValue in the map.
func (AttributeMap) Sort ¶ added in v0.2.8
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 ¶ added in v0.2.8
func (am AttributeMap) Update(akv AttributeKeyValue)
Update updates an existing AttributeKeyValue with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) Upsert ¶ added in v0.2.8
func (am AttributeMap) Upsert(akv AttributeKeyValue)
Upsert performs the Insert or Insert action. The AttributeKeyValue 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 an Attributes map. Must use one of NewAttributeValue* functions below to create new instances. Important: zero-initialized instance is not valid for use.
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.SetInt(234) } function f2() { v := NewAttributeValueString("a string") f1(v) _ := v.GetType() // this will return AttributeValueINT }
func NewAttributeValueBool ¶
func NewAttributeValueBool(v bool) AttributeValue
func NewAttributeValueDouble ¶
func NewAttributeValueDouble(v float64) AttributeValue
func NewAttributeValueInt ¶
func NewAttributeValueInt(v int64) AttributeValue
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
func (AttributeValue) BoolVal ¶
func (a AttributeValue) BoolVal() bool
func (AttributeValue) DoubleVal ¶
func (a AttributeValue) DoubleVal() float64
func (AttributeValue) IntVal ¶
func (a AttributeValue) IntVal() int64
func (AttributeValue) SetBool ¶
func (a AttributeValue) SetBool(v bool)
func (AttributeValue) SetDouble ¶
func (a AttributeValue) SetDouble(v float64)
func (AttributeValue) SetInt ¶
func (a AttributeValue) SetInt(v int64)
func (AttributeValue) SetString ¶
func (a AttributeValue) SetString(v string)
func (AttributeValue) StringVal ¶
func (a AttributeValue) StringVal() string
func (AttributeValue) Type ¶
func (a AttributeValue) Type() AttributeValueType
type AttributeValueType ¶
type AttributeValueType int32
AttributeValueType specifies the type of value. Numerically is equal to otlp.AttributeKeyValue_ValueType.
const ( AttributeValueSTRING AttributeValueType = AttributeValueType(otlpcommon.AttributeKeyValue_STRING) AttributeValueINT AttributeValueType = AttributeValueType(otlpcommon.AttributeKeyValue_INT) AttributeValueDOUBLE AttributeValueType = AttributeValueType(otlpcommon.AttributeKeyValue_DOUBLE) AttributeValueBOOL AttributeValueType = AttributeValueType(otlpcommon.AttributeKeyValue_BOOL) )
type AttributesMap ¶
type AttributesMap map[string]AttributeValue
AttributesMap stores a map of attribute keys to values. TODO: Remove usage of this and use AttributeMap
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 passsed 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 empty DoubleDataPoint.
func (DoubleDataPoint) LabelsMap ¶ added in v0.2.8
func (ms DoubleDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this DoubleDataPoint.
func (DoubleDataPoint) SetLabelsMap ¶ added in v0.2.8
func (ms DoubleDataPoint) SetLabelsMap(v StringMap)
SetLabelsMap replaces the Labels associated with this DoubleDataPoint.
func (DoubleDataPoint) SetStartTime ¶
func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this DoubleDataPoint.
func (DoubleDataPoint) SetTimestamp ¶
func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) SetValue ¶
func (ms DoubleDataPoint) SetValue(v float64)
SetValue replaces the value associated with this DoubleDataPoint.
func (DoubleDataPoint) StartTime ¶
func (ms DoubleDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this DoubleDataPoint.
func (DoubleDataPoint) Timestamp ¶
func (ms DoubleDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) Value ¶
func (ms DoubleDataPoint) Value() float64
Value returns the value associated with this DoubleDataPoint.
type DoubleDataPointSlice ¶ added in v0.2.8
type DoubleDataPointSlice struct {
// contains filtered or unexported fields
}
DoubleDataPointSlice logically represents a slice of DoubleDataPoint.
This is a reference type, if passsed 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(len int) DoubleDataPointSlice
NewDoubleDataPointSlice creates a DoubleDataPointSlice with "len" empty elements.
es := NewDoubleDataPointSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (DoubleDataPointSlice) Get ¶ added in v0.2.8
func (es DoubleDataPointSlice) Get(ix int) DoubleDataPoint
Get 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.Get(i) ... // Do something with the element }
func (DoubleDataPointSlice) Len ¶ added in v0.2.8
func (es DoubleDataPointSlice) Len() int
Len returns the number of elements in the slice.
func (DoubleDataPointSlice) Remove ¶ added in v0.2.8
func (es DoubleDataPointSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (DoubleDataPointSlice) Resize ¶ added in v0.2.8
func (es DoubleDataPointSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type HistogramBucket ¶
type HistogramBucket struct {
// contains filtered or unexported fields
}
HistogramBucket contains values for a histogram bucket.
This is a reference type, if passsed 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 empty HistogramBucket.
func (HistogramBucket) Count ¶
func (ms HistogramBucket) Count() uint64
Count returns the count associated with this HistogramBucket.
func (HistogramBucket) Exemplar ¶
func (ms HistogramBucket) Exemplar() HistogramBucketExemplar
Exemplar returns the exemplar associated with this HistogramBucket.
func (HistogramBucket) SetCount ¶
func (ms HistogramBucket) SetCount(v uint64)
SetCount replaces the count associated with this HistogramBucket.
func (HistogramBucket) SetExemplar ¶
func (ms HistogramBucket) SetExemplar(v HistogramBucketExemplar)
SetExemplar replaces the exemplar associated with this HistogramBucket.
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 passsed 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 empty HistogramBucketExemplar.
func (HistogramBucketExemplar) Attachments ¶
func (ms HistogramBucketExemplar) Attachments() StringMap
Attachments returns the Attachments associated with this HistogramBucketExemplar.
func (HistogramBucketExemplar) SetAttachments ¶
func (ms HistogramBucketExemplar) SetAttachments(v StringMap)
SetAttachments replaces the Attachments associated with this HistogramBucketExemplar.
func (HistogramBucketExemplar) SetTimestamp ¶
func (ms HistogramBucketExemplar) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this HistogramBucketExemplar.
func (HistogramBucketExemplar) SetValue ¶
func (ms HistogramBucketExemplar) SetValue(v float64)
SetValue replaces the value associated with this HistogramBucketExemplar.
func (HistogramBucketExemplar) Timestamp ¶
func (ms HistogramBucketExemplar) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this HistogramBucketExemplar.
func (HistogramBucketExemplar) Value ¶
func (ms HistogramBucketExemplar) Value() float64
Value returns the value associated with this HistogramBucketExemplar.
type HistogramBucketSlice ¶ added in v0.2.8
type HistogramBucketSlice struct {
// contains filtered or unexported fields
}
HistogramBucketSlice logically represents a slice of HistogramBucket.
This is a reference type, if passsed 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(len int) HistogramBucketSlice
NewHistogramBucketSlice creates a HistogramBucketSlice with "len" empty elements.
es := NewHistogramBucketSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (HistogramBucketSlice) Get ¶ added in v0.2.8
func (es HistogramBucketSlice) Get(ix int) HistogramBucket
Get 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.Get(i) ... // Do something with the element }
func (HistogramBucketSlice) Len ¶ added in v0.2.8
func (es HistogramBucketSlice) Len() int
Len returns the number of elements in the slice.
func (HistogramBucketSlice) Remove ¶ added in v0.2.8
func (es HistogramBucketSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (HistogramBucketSlice) Resize ¶ added in v0.2.8
func (es HistogramBucketSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
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 passsed 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 empty HistogramDataPoint.
func (HistogramDataPoint) Buckets ¶
func (ms HistogramDataPoint) Buckets() HistogramBucketSlice
Buckets returns the Buckets associated with this HistogramDataPoint.
func (HistogramDataPoint) Count ¶
func (ms HistogramDataPoint) Count() uint64
Count returns the count associated with this HistogramDataPoint.
func (HistogramDataPoint) ExplicitBounds ¶
func (ms HistogramDataPoint) ExplicitBounds() []float64
ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint.
func (HistogramDataPoint) LabelsMap ¶ added in v0.2.8
func (ms HistogramDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this HistogramDataPoint.
func (HistogramDataPoint) SetBuckets ¶
func (ms HistogramDataPoint) SetBuckets(v HistogramBucketSlice)
SetBuckets replaces the Buckets associated with this HistogramDataPoint.
func (HistogramDataPoint) SetCount ¶
func (ms HistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this HistogramDataPoint.
func (HistogramDataPoint) SetExplicitBounds ¶
func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
SetExplicitBounds replaces the explicitbounds associated with this HistogramDataPoint.
func (HistogramDataPoint) SetLabelsMap ¶ added in v0.2.8
func (ms HistogramDataPoint) SetLabelsMap(v StringMap)
SetLabelsMap replaces the Labels associated with this HistogramDataPoint.
func (HistogramDataPoint) SetStartTime ¶
func (ms HistogramDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this HistogramDataPoint.
func (HistogramDataPoint) SetSum ¶
func (ms HistogramDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this HistogramDataPoint.
func (HistogramDataPoint) SetTimestamp ¶
func (ms HistogramDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this HistogramDataPoint.
func (HistogramDataPoint) StartTime ¶
func (ms HistogramDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this HistogramDataPoint.
func (HistogramDataPoint) Sum ¶
func (ms HistogramDataPoint) Sum() float64
Sum returns the sum associated with this HistogramDataPoint.
func (HistogramDataPoint) Timestamp ¶
func (ms HistogramDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this HistogramDataPoint.
type HistogramDataPointSlice ¶ added in v0.2.8
type HistogramDataPointSlice struct {
// contains filtered or unexported fields
}
HistogramDataPointSlice logically represents a slice of HistogramDataPoint.
This is a reference type, if passsed 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(len int) HistogramDataPointSlice
NewHistogramDataPointSlice creates a HistogramDataPointSlice with "len" empty elements.
es := NewHistogramDataPointSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (HistogramDataPointSlice) Get ¶ added in v0.2.8
func (es HistogramDataPointSlice) Get(ix int) HistogramDataPoint
Get 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.Get(i) ... // Do something with the element }
func (HistogramDataPointSlice) Len ¶ added in v0.2.8
func (es HistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
func (HistogramDataPointSlice) Remove ¶ added in v0.2.8
func (es HistogramDataPointSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (HistogramDataPointSlice) Resize ¶ added in v0.2.8
func (es HistogramDataPointSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
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 passsed 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 empty InstrumentationLibrary.
func (InstrumentationLibrary) Name ¶
func (ms InstrumentationLibrary) Name() string
Name returns the name associated with this InstrumentationLibrary.
func (InstrumentationLibrary) SetName ¶
func (ms InstrumentationLibrary) SetName(v string)
SetName replaces the name associated with this InstrumentationLibrary.
func (InstrumentationLibrary) SetVersion ¶
func (ms InstrumentationLibrary) SetVersion(v string)
SetVersion replaces the version associated with this InstrumentationLibrary.
func (InstrumentationLibrary) Version ¶
func (ms InstrumentationLibrary) Version() string
Version returns the version associated with this InstrumentationLibrary.
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 passsed 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 ¶ added in v0.2.8
func NewInstrumentationLibraryMetrics() InstrumentationLibraryMetrics
NewInstrumentationLibraryMetrics creates a new empty InstrumentationLibraryMetrics.
func (InstrumentationLibraryMetrics) InstrumentationLibrary ¶
func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryMetrics.
func (InstrumentationLibraryMetrics) Metrics ¶
func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice
Metrics returns the Metrics associated with this InstrumentationLibraryMetrics.
func (InstrumentationLibraryMetrics) SetInstrumentationLibrary ¶ added in v0.2.8
func (ms InstrumentationLibraryMetrics) SetInstrumentationLibrary(v InstrumentationLibrary)
SetInstrumentationLibrary replaces the instrumentationlibrary associated with this InstrumentationLibraryMetrics.
func (InstrumentationLibraryMetrics) SetMetrics ¶
func (ms InstrumentationLibraryMetrics) SetMetrics(v MetricSlice)
SetMetrics replaces the Metrics associated with this InstrumentationLibraryMetrics.
type InstrumentationLibraryMetricsSlice ¶ added in v0.2.8
type InstrumentationLibraryMetricsSlice struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetricsSlice logically represents a slice of InstrumentationLibraryMetrics.
This is a reference type, if passsed 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(len int) InstrumentationLibraryMetricsSlice
NewInstrumentationLibraryMetricsSlice creates a InstrumentationLibraryMetricsSlice with "len" empty elements.
es := NewInstrumentationLibraryMetricsSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (InstrumentationLibraryMetricsSlice) Get ¶ added in v0.2.8
func (es InstrumentationLibraryMetricsSlice) Get(ix int) InstrumentationLibraryMetrics
Get 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.Get(i) ... // Do something with the element }
func (InstrumentationLibraryMetricsSlice) Len ¶ added in v0.2.8
func (es InstrumentationLibraryMetricsSlice) Len() int
Len returns the number of elements in the slice.
func (InstrumentationLibraryMetricsSlice) Remove ¶ added in v0.2.8
func (es InstrumentationLibraryMetricsSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (InstrumentationLibraryMetricsSlice) Resize ¶ added in v0.2.8
func (es InstrumentationLibraryMetricsSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type InstrumentationLibrarySpans ¶
type InstrumentationLibrarySpans struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpans represents a collection of spans from a InstrumentationLibrary.
Must use NewInstrumentationLibrarySpans functions to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrarySpans ¶
func NewInstrumentationLibrarySpans(il InstrumentationLibrary, spans []Span) *InstrumentationLibrarySpans
func (*InstrumentationLibrarySpans) InstrumentationLibrary ¶
func (ils *InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
func (*InstrumentationLibrarySpans) SetInstrumentationLibrary ¶
func (ils *InstrumentationLibrarySpans) SetInstrumentationLibrary(il InstrumentationLibrary)
func (*InstrumentationLibrarySpans) SetSpans ¶
func (ils *InstrumentationLibrarySpans) SetSpans(s []Span)
func (*InstrumentationLibrarySpans) Spans ¶
func (ils *InstrumentationLibrarySpans) Spans() []Span
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 passsed 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 empty Int64DataPoint.
func (Int64DataPoint) LabelsMap ¶ added in v0.2.8
func (ms Int64DataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this Int64DataPoint.
func (Int64DataPoint) SetLabelsMap ¶ added in v0.2.8
func (ms Int64DataPoint) SetLabelsMap(v StringMap)
SetLabelsMap replaces the Labels associated with this Int64DataPoint.
func (Int64DataPoint) SetStartTime ¶
func (ms Int64DataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this Int64DataPoint.
func (Int64DataPoint) SetTimestamp ¶
func (ms Int64DataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this Int64DataPoint.
func (Int64DataPoint) SetValue ¶
func (ms Int64DataPoint) SetValue(v int64)
SetValue replaces the value associated with this Int64DataPoint.
func (Int64DataPoint) StartTime ¶
func (ms Int64DataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this Int64DataPoint.
func (Int64DataPoint) Timestamp ¶
func (ms Int64DataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this Int64DataPoint.
func (Int64DataPoint) Value ¶
func (ms Int64DataPoint) Value() int64
Value returns the value associated with this Int64DataPoint.
type Int64DataPointSlice ¶ added in v0.2.8
type Int64DataPointSlice struct {
// contains filtered or unexported fields
}
Int64DataPointSlice logically represents a slice of Int64DataPoint.
This is a reference type, if passsed 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(len int) Int64DataPointSlice
NewInt64DataPointSlice creates a Int64DataPointSlice with "len" empty elements.
es := NewInt64DataPointSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (Int64DataPointSlice) Get ¶ added in v0.2.8
func (es Int64DataPointSlice) Get(ix int) Int64DataPoint
Get 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.Get(i) ... // Do something with the element }
func (Int64DataPointSlice) Len ¶ added in v0.2.8
func (es Int64DataPointSlice) Len() int
Len returns the number of elements in the slice.
func (Int64DataPointSlice) Remove ¶ added in v0.2.8
func (es Int64DataPointSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (Int64DataPointSlice) Resize ¶ added in v0.2.8
func (es Int64DataPointSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
MetricDescriptor is the descriptor of a metric.
This is a reference type, if passsed 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 (Metric) DoubleDataPoints ¶
func (ms Metric) DoubleDataPoints() DoubleDataPointSlice
DoubleDataPoints returns the DoubleDataPoints associated with this Metric.
func (Metric) HistogramDataPoints ¶
func (ms Metric) HistogramDataPoints() HistogramDataPointSlice
HistogramDataPoints returns the HistogramDataPoints associated with this Metric.
func (Metric) Int64DataPoints ¶
func (ms Metric) Int64DataPoints() Int64DataPointSlice
Int64DataPoints returns the Int64DataPoints associated with this Metric.
func (Metric) MetricDescriptor ¶
func (ms Metric) MetricDescriptor() MetricDescriptor
MetricDescriptor returns the metricdescriptor associated with this Metric.
func (Metric) SetDoubleDataPoints ¶
func (ms Metric) SetDoubleDataPoints(v DoubleDataPointSlice)
SetDoubleDataPoints replaces the DoubleDataPoints associated with this Metric.
func (Metric) SetHistogramDataPoints ¶
func (ms Metric) SetHistogramDataPoints(v HistogramDataPointSlice)
SetHistogramDataPoints replaces the HistogramDataPoints associated with this Metric.
func (Metric) SetInt64DataPoints ¶
func (ms Metric) SetInt64DataPoints(v Int64DataPointSlice)
SetInt64DataPoints replaces the Int64DataPoints associated with this Metric.
func (Metric) SetMetricDescriptor ¶
func (ms Metric) SetMetricDescriptor(v MetricDescriptor)
SetMetricDescriptor replaces the metricdescriptor associated with this Metric.
func (Metric) SetSummaryDataPoints ¶
func (ms Metric) SetSummaryDataPoints(v SummaryDataPointSlice)
SetSummaryDataPoints replaces the SummaryDataPoints associated with this Metric.
func (Metric) SummaryDataPoints ¶
func (ms Metric) SummaryDataPoints() SummaryDataPointSlice
SummaryDataPoints returns the SummaryDataPoints associated with this Metric.
type MetricData ¶
type MetricData struct {
// contains filtered or unexported fields
}
MetricData is the top-level struct that is propagated through the metrics pipeline. This is the newer version of consumerdata.MetricsData, but uses more efficient in-memory representation.
This is a reference type (like builtin map).
Must use NewMetricData functions to create new instances. Important: zero-initialized instance is not valid for use.
func MetricDataFromOtlp ¶
func MetricDataFromOtlp(orig []*otlpmetrics.ResourceMetrics) MetricData
MetricDataFromOtlp creates the internal MetricData representation from the OTLP.
func (MetricData) MetricCount ¶
func (md MetricData) MetricCount() int
MetricCount calculates the total number of metrics.
func (MetricData) ResourceMetrics ¶
func (md MetricData) ResourceMetrics() ResourceMetricsSlice
func (MetricData) SetResourceMetrics ¶
func (md MetricData) SetResourceMetrics(v ResourceMetricsSlice)
type MetricDescriptor ¶
type MetricDescriptor struct {
// contains filtered or unexported fields
}
MetricDescriptor is the descriptor of a metric.
This is a reference type, if passsed 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 empty MetricDescriptor.
func (MetricDescriptor) Description ¶
func (ms MetricDescriptor) Description() string
Description returns the description associated with this MetricDescriptor.
func (MetricDescriptor) LabelsMap ¶ added in v0.2.8
func (ms MetricDescriptor) LabelsMap() StringMap
LabelsMap returns the Labels associated with this MetricDescriptor.
func (MetricDescriptor) Name ¶
func (ms MetricDescriptor) Name() string
Name returns the name associated with this MetricDescriptor.
func (MetricDescriptor) SetDescription ¶
func (ms MetricDescriptor) SetDescription(v string)
SetDescription replaces the description associated with this MetricDescriptor.
func (MetricDescriptor) SetLabelsMap ¶ added in v0.2.8
func (ms MetricDescriptor) SetLabelsMap(v StringMap)
SetLabelsMap replaces the Labels associated with this MetricDescriptor.
func (MetricDescriptor) SetName ¶
func (ms MetricDescriptor) SetName(v string)
SetName replaces the name associated with this MetricDescriptor.
func (MetricDescriptor) SetType ¶ added in v0.2.8
func (ms MetricDescriptor) SetType(v MetricType)
SetType replaces the type associated with this MetricDescriptor.
func (MetricDescriptor) SetUnit ¶
func (ms MetricDescriptor) SetUnit(v string)
SetUnit replaces the unit associated with this MetricDescriptor.
func (MetricDescriptor) Type ¶
func (ms MetricDescriptor) Type() MetricType
Type returns the type associated with this MetricDescriptor.
func (MetricDescriptor) Unit ¶
func (ms MetricDescriptor) Unit() string
Unit returns the unit associated with this MetricDescriptor.
type MetricSlice ¶ added in v0.2.8
type MetricSlice struct {
// contains filtered or unexported fields
}
MetricSlice logically represents a slice of Metric.
This is a reference type, if passsed 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(len int) MetricSlice
NewMetricSlice creates a MetricSlice with "len" empty elements.
es := NewMetricSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (MetricSlice) Get ¶ added in v0.2.8
func (es MetricSlice) Get(ix int) Metric
Get 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.Get(i) ... // Do something with the element }
func (MetricSlice) Len ¶ added in v0.2.8
func (es MetricSlice) Len() int
Len returns the number of elements in the slice.
func (MetricSlice) Remove ¶ added in v0.2.8
func (es MetricSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (MetricSlice) Resize ¶ added in v0.2.8
func (es MetricSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type MetricType ¶
type MetricType otlpmetrics.MetricDescriptor_Type
const ( MetricTypeUnspecified MetricType = MetricType(otlpmetrics.MetricDescriptor_UNSPECIFIED) MetricTypeGaugeInt64 MetricType = MetricType(otlpmetrics.MetricDescriptor_GAUGE_INT64) MetricTypeGaugeDouble MetricType = MetricType(otlpmetrics.MetricDescriptor_GAUGE_DOUBLE) MetricTypeGaugeHistogram MetricType = MetricType(otlpmetrics.MetricDescriptor_GAUGE_HISTOGRAM) MetricTypeCounterInt64 MetricType = MetricType(otlpmetrics.MetricDescriptor_COUNTER_INT64) MetricTypeCounterDouble MetricType = MetricType(otlpmetrics.MetricDescriptor_COUNTER_DOUBLE) MetricTypeCumulativeHistogram MetricType = MetricType(otlpmetrics.MetricDescriptor_CUMULATIVE_HISTOGRAM) MetricTypeSummary MetricType = MetricType(otlpmetrics.MetricDescriptor_SUMMARY) )
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource information.
This is a reference type, if passsed 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 (Resource) Attributes ¶
func (ms Resource) Attributes() AttributeMap
Attributes returns the Attributes associated with this Resource.
func (Resource) SetAttributes ¶
func (ms Resource) SetAttributes(v AttributeMap)
SetAttributes replaces the Attributes associated with this Resource.
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 passsed 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 empty ResourceMetrics.
func (ResourceMetrics) InstrumentationLibraryMetrics ¶
func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice
InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics.
func (ResourceMetrics) Resource ¶
func (ms ResourceMetrics) Resource() Resource
Resource returns the resource associated with this ResourceMetrics.
func (ResourceMetrics) SetInstrumentationLibraryMetrics ¶
func (ms ResourceMetrics) SetInstrumentationLibraryMetrics(v InstrumentationLibraryMetricsSlice)
SetInstrumentationLibraryMetrics replaces the InstrumentationLibraryMetrics associated with this ResourceMetrics.
func (ResourceMetrics) SetResource ¶
func (ms ResourceMetrics) SetResource(v Resource)
SetResource replaces the resource associated with this ResourceMetrics.
type ResourceMetricsSlice ¶ added in v0.2.8
type ResourceMetricsSlice struct {
// contains filtered or unexported fields
}
ResourceMetricsSlice logically represents a slice of ResourceMetrics.
This is a reference type, if passsed 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 NewResourceMetricsSlice ¶
func NewResourceMetricsSlice(len int) ResourceMetricsSlice
NewResourceMetricsSlice creates a ResourceMetricsSlice with "len" empty elements.
es := NewResourceMetricsSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (ResourceMetricsSlice) Get ¶ added in v0.2.8
func (es ResourceMetricsSlice) Get(ix int) ResourceMetrics
Get 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.Get(i) ... // Do something with the element }
func (ResourceMetricsSlice) Len ¶ added in v0.2.8
func (es ResourceMetricsSlice) Len() int
Len returns the number of elements in the slice.
func (ResourceMetricsSlice) Remove ¶ added in v0.2.8
func (es ResourceMetricsSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (ResourceMetricsSlice) Resize ¶ added in v0.2.8
func (es ResourceMetricsSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type ResourceSpans ¶
type ResourceSpans struct {
// contains filtered or unexported fields
}
A collection of spans from a Resource.
Must use NewResourceSpans functions to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceSpans ¶
func NewResourceSpans(resource Resource, ils []*InstrumentationLibrarySpans) *ResourceSpans
func (*ResourceSpans) InstrumentationLibrarySpans ¶
func (m *ResourceSpans) InstrumentationLibrarySpans() []*InstrumentationLibrarySpans
func (*ResourceSpans) Resource ¶
func (m *ResourceSpans) Resource() Resource
func (*ResourceSpans) SetInstrumentationLibrarySpans ¶
func (m *ResourceSpans) SetInstrumentationLibrarySpans(s []*InstrumentationLibrarySpans)
func (*ResourceSpans) SetResource ¶
func (m *ResourceSpans) SetResource(r Resource)
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 passsed 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 NewSpanSlice ¶
NewSpanSlice creates a slice of pointers to Spans that are correctly initialized.
func (Span) Attributes ¶
func (ms Span) Attributes() AttributeMap
Attributes returns the Attributes associated with this Span.
func (Span) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this Span.
func (Span) DroppedEventsCount ¶
DroppedEventsCount returns the droppedeventscount associated with this Span.
func (Span) DroppedLinksCount ¶
DroppedLinksCount returns the droppedlinkscount associated with this Span.
func (Span) EndTime ¶
func (ms Span) EndTime() TimestampUnixNano
EndTime returns the endtime associated with this Span.
func (Span) Events ¶
func (ms Span) Events() SpanEventSlice
Events returns the Events associated with this Span.
func (Span) Links ¶
func (ms Span) Links() SpanLinkSlice
Links returns the Links associated with this Span.
func (Span) ParentSpanID ¶
ParentSpanID returns the parentspanid associated with this Span.
func (Span) SetAttributes ¶
func (ms Span) SetAttributes(v AttributeMap)
SetAttributes replaces the Attributes associated with this Span.
func (Span) SetDroppedAttributesCount ¶ added in v0.2.8
SetDroppedAttributesCount replaces the droppedattributescount associated with this Span.
func (Span) SetDroppedEventsCount ¶
SetDroppedEventsCount replaces the droppedeventscount associated with this Span.
func (Span) SetDroppedLinksCount ¶
SetDroppedLinksCount replaces the droppedlinkscount associated with this Span.
func (Span) SetEndTime ¶
func (ms Span) SetEndTime(v TimestampUnixNano)
SetEndTime replaces the endtime associated with this Span.
func (Span) SetEvents ¶
func (ms Span) SetEvents(v SpanEventSlice)
SetEvents replaces the Events associated with this Span.
func (Span) SetLinks ¶
func (ms Span) SetLinks(v SpanLinkSlice)
SetLinks replaces the Links associated with this Span.
func (Span) SetParentSpanID ¶
SetParentSpanID replaces the parentspanid associated with this Span.
func (Span) SetStartTime ¶
func (ms Span) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this Span.
func (Span) SetStatus ¶
func (ms Span) SetStatus(v SpanStatus)
SetStatus replaces the status associated with this Span.
func (Span) SetTraceID ¶
SetTraceID replaces the traceid associated with this Span.
func (Span) SetTraceState ¶
func (ms Span) SetTraceState(v TraceState)
SetTraceState replaces the tracestate associated with this Span.
func (Span) StartTime ¶
func (ms Span) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this Span.
func (Span) Status ¶
func (ms Span) Status() SpanStatus
Status returns the status associated with this Span.
func (Span) TraceState ¶
func (ms Span) TraceState() TraceState
TraceState returns the tracestate associated with this Span.
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 passsed 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 (SpanEvent) Attributes ¶
func (ms SpanEvent) Attributes() AttributeMap
Attributes returns the Attributes associated with this SpanEvent.
func (SpanEvent) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent.
func (SpanEvent) SetAttributes ¶
func (ms SpanEvent) SetAttributes(v AttributeMap)
SetAttributes replaces the Attributes associated with this SpanEvent.
func (SpanEvent) SetDroppedAttributesCount ¶ added in v0.2.8
SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent.
func (SpanEvent) SetTimestamp ¶
func (ms SpanEvent) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this SpanEvent.
func (SpanEvent) Timestamp ¶
func (ms SpanEvent) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this SpanEvent.
type SpanEventSlice ¶ added in v0.2.8
type SpanEventSlice struct {
// contains filtered or unexported fields
}
SpanEventSlice logically represents a slice of SpanEvent.
This is a reference type, if passsed 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(len int) SpanEventSlice
NewSpanEventSlice creates a SpanEventSlice with "len" empty elements.
es := NewSpanEventSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (SpanEventSlice) Get ¶ added in v0.2.8
func (es SpanEventSlice) Get(ix int) SpanEvent
Get 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.Get(i) ... // Do something with the element }
func (SpanEventSlice) Len ¶ added in v0.2.8
func (es SpanEventSlice) Len() int
Len returns the number of elements in the slice.
func (SpanEventSlice) Remove ¶ added in v0.2.8
func (es SpanEventSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (SpanEventSlice) Resize ¶ added in v0.2.8
func (es SpanEventSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
type SpanKind ¶
type SpanKind otlptrace.Span_SpanKind
const ( SpanKindUNSPECIFIED SpanKind = 0 SpanKindINTERNAL SpanKind = SpanKind(otlptrace.Span_INTERNAL) SpanKindSERVER SpanKind = SpanKind(otlptrace.Span_SERVER) SpanKindCLIENT SpanKind = SpanKind(otlptrace.Span_CLIENT) SpanKindPRODUCER SpanKind = SpanKind(otlptrace.Span_PRODUCER) SpanKindCONSUMER SpanKind = SpanKind(otlptrace.Span_CONSUMER) )
type SpanLink ¶
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 passsed 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 (SpanLink) Attributes ¶
func (ms SpanLink) Attributes() AttributeMap
Attributes returns the Attributes associated with this SpanLink.
func (SpanLink) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this SpanLink.
func (SpanLink) SetAttributes ¶
func (ms SpanLink) SetAttributes(v AttributeMap)
SetAttributes replaces the Attributes associated with this SpanLink.
func (SpanLink) SetDroppedAttributesCount ¶ added in v0.2.8
SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink.
func (SpanLink) SetTraceID ¶
SetTraceID replaces the traceid associated with this SpanLink.
func (SpanLink) SetTraceState ¶
func (ms SpanLink) SetTraceState(v TraceState)
SetTraceState replaces the tracestate associated with this SpanLink.
func (SpanLink) TraceState ¶
func (ms SpanLink) TraceState() TraceState
TraceState returns the tracestate associated with this SpanLink.
type SpanLinkSlice ¶ added in v0.2.8
type SpanLinkSlice struct {
// contains filtered or unexported fields
}
SpanLinkSlice logically represents a slice of SpanLink.
This is a reference type, if passsed 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(len int) SpanLinkSlice
NewSpanLinkSlice creates a SpanLinkSlice with "len" empty elements.
es := NewSpanLinkSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (SpanLinkSlice) Get ¶ added in v0.2.8
func (es SpanLinkSlice) Get(ix int) SpanLink
Get 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.Get(i) ... // Do something with the element }
func (SpanLinkSlice) Len ¶ added in v0.2.8
func (es SpanLinkSlice) Len() int
Len returns the number of elements in the slice.
func (SpanLinkSlice) Remove ¶ added in v0.2.8
func (es SpanLinkSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (SpanLinkSlice) Resize ¶ added in v0.2.8
func (es SpanLinkSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
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 passsed 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 (SpanStatus) Code ¶
func (ms SpanStatus) Code() StatusCode
Code returns the code associated with this SpanStatus.
func (SpanStatus) Message ¶
func (ms SpanStatus) Message() string
Message returns the message associated with this SpanStatus.
func (SpanStatus) SetCode ¶ added in v0.2.8
func (ms SpanStatus) SetCode(v StatusCode)
SetCode replaces the code associated with this SpanStatus.
func (SpanStatus) SetMessage ¶ added in v0.2.8
func (ms SpanStatus) SetMessage(v string)
SetMessage replaces the message associated with this SpanStatus.
type StatusCode ¶
type StatusCode otlptrace.Status_StatusCode
StatusCode mirrors the codes defined at https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#statuscanonicalcode and is numerically equal to Standard GRPC codes https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
type StringKeyValue ¶ added in v0.2.8
type StringKeyValue struct {
// contains filtered or unexported fields
}
StringKeyValue stores a key and value pair.
func NewStringKeyValue ¶ added in v0.2.8
func NewStringKeyValue(k string, v string) StringKeyValue
NewStringKeyValue creates a new StringKeyValue with the given key and value.
func (StringKeyValue) Key ¶ added in v0.2.8
func (akv StringKeyValue) Key() string
Key returns the key associated with this StringKeyValue.
func (StringKeyValue) SetValue ¶ added in v0.2.8
func (akv StringKeyValue) SetValue(v string)
SetValue replaces the value associated with this StringKeyValue.
func (StringKeyValue) Value ¶ added in v0.2.8
func (akv StringKeyValue) Value() string
Value returns the value associated with this StringKeyValue.
type StringMap ¶ added in v0.2.8
type StringMap struct {
// contains filtered or unexported fields
}
StringMap stores a map of attribute keys to values.
func NewStringMap ¶ added in v0.2.8
NewStringMap creates a new StringMap from the given map[string]string.
func (StringMap) Delete ¶ added in v0.2.8
Delete deletes the entry associated with the key and returns true if the key was present in the map, otherwise returns false.
func (StringMap) Get ¶ added in v0.2.8
func (sm StringMap) Get(k string) (StringKeyValue, bool)
Get returns the StringKeyValue associated with the key and true, otherwise an invalid instance of the StringKeyValue and false.
func (StringMap) GetStringKeyValue ¶ added in v0.2.8
func (sm StringMap) GetStringKeyValue(ix int) StringKeyValue
GetStringKeyValue returns the StringKeyValue associated with the given index.
This function is used mostly for iterating over all the values in the map:
for i := 0; i < am.Len(); i++ { akv := am.GetStringKeyValue(i) ... // Do something with the attribute }
func (StringMap) Insert ¶ added in v0.2.8
Insert adds the StringKeyValue to the map when the key does not exist. No action is applied to the map where the key already exists.
func (StringMap) Sort ¶ added in v0.2.8
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())
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 passsed 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 empty SummaryDataPoint.
func (SummaryDataPoint) Count ¶
func (ms SummaryDataPoint) Count() uint64
Count returns the count associated with this SummaryDataPoint.
func (SummaryDataPoint) LabelsMap ¶ added in v0.2.8
func (ms SummaryDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this SummaryDataPoint.
func (SummaryDataPoint) SetCount ¶
func (ms SummaryDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this SummaryDataPoint.
func (SummaryDataPoint) SetLabelsMap ¶ added in v0.2.8
func (ms SummaryDataPoint) SetLabelsMap(v StringMap)
SetLabelsMap replaces the Labels associated with this SummaryDataPoint.
func (SummaryDataPoint) SetStartTime ¶
func (ms SummaryDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this SummaryDataPoint.
func (SummaryDataPoint) SetSum ¶
func (ms SummaryDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this SummaryDataPoint.
func (SummaryDataPoint) SetTimestamp ¶
func (ms SummaryDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) SetValueAtPercentiles ¶
func (ms SummaryDataPoint) SetValueAtPercentiles(v SummaryValueAtPercentileSlice)
SetValueAtPercentiles replaces the PercentileValues associated with this SummaryDataPoint.
func (SummaryDataPoint) StartTime ¶
func (ms SummaryDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this SummaryDataPoint.
func (SummaryDataPoint) Sum ¶
func (ms SummaryDataPoint) Sum() float64
Sum returns the sum associated with this SummaryDataPoint.
func (SummaryDataPoint) Timestamp ¶
func (ms SummaryDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) ValueAtPercentiles ¶
func (ms SummaryDataPoint) ValueAtPercentiles() SummaryValueAtPercentileSlice
ValueAtPercentiles returns the PercentileValues associated with this SummaryDataPoint.
type SummaryDataPointSlice ¶ added in v0.2.8
type SummaryDataPointSlice struct {
// contains filtered or unexported fields
}
SummaryDataPointSlice logically represents a slice of SummaryDataPoint.
This is a reference type, if passsed 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(len int) SummaryDataPointSlice
NewSummaryDataPointSlice creates a SummaryDataPointSlice with "len" empty elements.
es := NewSummaryDataPointSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (SummaryDataPointSlice) Get ¶ added in v0.2.8
func (es SummaryDataPointSlice) Get(ix int) SummaryDataPoint
Get 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.Get(i) ... // Do something with the element }
func (SummaryDataPointSlice) Len ¶ added in v0.2.8
func (es SummaryDataPointSlice) Len() int
Len returns the number of elements in the slice.
func (SummaryDataPointSlice) Remove ¶ added in v0.2.8
func (es SummaryDataPointSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (SummaryDataPointSlice) Resize ¶ added in v0.2.8
func (es SummaryDataPointSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
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 passsed 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 empty SummaryValueAtPercentile.
func (SummaryValueAtPercentile) Percentile ¶
func (ms SummaryValueAtPercentile) Percentile() float64
Percentile returns the percentile associated with this SummaryValueAtPercentile.
func (SummaryValueAtPercentile) SetPercentile ¶
func (ms SummaryValueAtPercentile) SetPercentile(v float64)
SetPercentile replaces the percentile associated with this SummaryValueAtPercentile.
func (SummaryValueAtPercentile) SetValue ¶
func (ms SummaryValueAtPercentile) SetValue(v float64)
SetValue replaces the value associated with this SummaryValueAtPercentile.
func (SummaryValueAtPercentile) Value ¶
func (ms SummaryValueAtPercentile) Value() float64
Value returns the value associated with this SummaryValueAtPercentile.
type SummaryValueAtPercentileSlice ¶ added in v0.2.8
type SummaryValueAtPercentileSlice struct {
// contains filtered or unexported fields
}
SummaryValueAtPercentileSlice logically represents a slice of SummaryValueAtPercentile.
This is a reference type, if passsed 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(len int) SummaryValueAtPercentileSlice
NewSummaryValueAtPercentileSlice creates a SummaryValueAtPercentileSlice with "len" empty elements.
es := NewSummaryValueAtPercentileSlice(4)
for i := 0; i < es.Len(); i++ { e := es.Get(i) // Here should set all the values for e. }
func (SummaryValueAtPercentileSlice) Get ¶ added in v0.2.8
func (es SummaryValueAtPercentileSlice) Get(ix int) SummaryValueAtPercentile
Get 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.Get(i) ... // Do something with the element }
func (SummaryValueAtPercentileSlice) Len ¶ added in v0.2.8
func (es SummaryValueAtPercentileSlice) Len() int
Len returns the number of elements in the slice.
func (SummaryValueAtPercentileSlice) Remove ¶ added in v0.2.8
func (es SummaryValueAtPercentileSlice) Remove(ix int)
Remove the element at the given index from the slice. Elements after the removed one are shifted to fill the emptied space. The length of the slice is reduced by one.
func (SummaryValueAtPercentileSlice) Resize ¶ added in v0.2.8
func (es SummaryValueAtPercentileSlice) Resize(from, to int)
Resize the slice. This operation is equivalent with slice[from:to].
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.
type TraceData ¶
type TraceData struct {
// contains filtered or unexported fields
}
TraceData is the top-level struct that is propagated through the traces pipeline. This is the newer version of consumerdata.TraceData, but uses more efficient in-memory representation.
func NewTraceData ¶
func NewTraceData(resourceSpans []*ResourceSpans) TraceData
func (TraceData) ResourceSpans ¶
func (td TraceData) ResourceSpans() []*ResourceSpans
type TraceState ¶
type TraceState string
TraceState in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header