Documentation
¶
Overview ¶
Package pdata (pipeline data) implements data structures that represent telemetry data in-memory. All data received is converted into this format, travels through the pipeline in this format, and 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 we are free to make changes to it in the future.
Most of the 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 that 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 allow creating more than one instance of the struct more efficiently instead of calling New* repeatedly. Use it where appropriate.
This package also provides common ways for decoding serialized bytes into protocol-specific in-memory data models (e.g. Zipkin Span). These data models can then be translated to pdata representations. Similarly, pdata types can be translated from a data model which can then be serialized into bytes.
* Encoding: Common interfaces for serializing/deserializing bytes from/to protocol-specific data models. * Translation: Common interfaces for translating protocol-specific data models from/to pdata types. * Marshaling: Common higher level APIs that do both encoding and translation of bytes and data model if going directly pdata types to bytes.
Index ¶
- Constants
- type AttributeMap
- func (am AttributeMap) AsRaw() map[string]interface{}
- func (am AttributeMap) Clear()
- func (am AttributeMap) CopyTo(dest AttributeMap)
- func (am AttributeMap) Delete(key string) bool
- func (am AttributeMap) EnsureCapacity(capacity int)
- func (am AttributeMap) Get(key string) (AttributeValue, bool)
- func (am AttributeMap) Insert(k string, v AttributeValue)
- func (am AttributeMap) InsertBool(k string, v bool)
- func (am AttributeMap) InsertBytes(k string, v []byte)
- func (am AttributeMap) InsertDouble(k string, v float64)
- func (am AttributeMap) InsertInt(k string, v int64)
- func (am AttributeMap) InsertNull(k string)
- func (am AttributeMap) InsertString(k string, v string)
- func (am AttributeMap) Len() int
- func (am AttributeMap) Range(f func(k string, v AttributeValue) bool)
- func (am AttributeMap) Sort() AttributeMap
- func (am AttributeMap) Update(k string, v AttributeValue)
- func (am AttributeMap) UpdateBool(k string, v bool)
- func (am AttributeMap) UpdateBytes(k string, v []byte)
- func (am AttributeMap) UpdateDouble(k string, v float64)
- func (am AttributeMap) UpdateInt(k string, v int64)
- func (am AttributeMap) UpdateString(k string, v string)
- func (am AttributeMap) Upsert(k string, v AttributeValue)
- func (am AttributeMap) UpsertBool(k string, v bool)
- func (am AttributeMap) UpsertBytes(k string, v []byte)
- func (am AttributeMap) UpsertDouble(k string, v float64)
- func (am AttributeMap) UpsertInt(k string, v int64)
- func (am AttributeMap) UpsertString(k string, v string)
- type AttributeValue
- func NewAttributeValueArray() AttributeValue
- func NewAttributeValueBool(v bool) AttributeValue
- func NewAttributeValueBytes(v []byte) AttributeValue
- func NewAttributeValueDouble(v float64) AttributeValue
- func NewAttributeValueEmpty() AttributeValue
- func NewAttributeValueInt(v int64) AttributeValue
- func NewAttributeValueMap() AttributeValue
- func NewAttributeValueString(v string) AttributeValue
- func (a AttributeValue) AsString() string
- func (a AttributeValue) BoolVal() bool
- func (a AttributeValue) BytesVal() []byte
- func (a AttributeValue) CopyTo(dest AttributeValue)
- func (a AttributeValue) DoubleVal() float64
- func (a AttributeValue) Equal(av AttributeValue) bool
- func (a AttributeValue) IntVal() int64
- func (a AttributeValue) MapVal() AttributeMap
- func (a AttributeValue) SetBoolVal(v bool)
- func (a AttributeValue) SetBytesVal(v []byte)
- func (a AttributeValue) SetDoubleVal(v float64)
- func (a AttributeValue) SetIntVal(v int64)
- func (a AttributeValue) SetStringVal(v string)
- func (a AttributeValue) SliceVal() AttributeValueSlice
- func (a AttributeValue) StringVal() string
- func (a AttributeValue) Type() AttributeValueType
- type AttributeValueSlice
- func (es AttributeValueSlice) AppendEmpty() AttributeValue
- func (es AttributeValueSlice) At(ix int) AttributeValue
- func (es AttributeValueSlice) CopyTo(dest AttributeValueSlice)
- func (es AttributeValueSlice) EnsureCapacity(newCap int)
- func (es AttributeValueSlice) Len() int
- func (es AttributeValueSlice) MoveAndAppendTo(dest AttributeValueSlice)
- func (es AttributeValueSlice) RemoveIf(f func(AttributeValue) bool)
- type AttributeValueType
- type Buckets
- type Exemplar
- func (ms Exemplar) CopyTo(dest Exemplar)
- func (ms Exemplar) DoubleVal() float64
- func (ms Exemplar) FilteredAttributes() AttributeMap
- func (ms Exemplar) IntVal() int64
- func (ms Exemplar) MoveTo(dest Exemplar)
- func (ms Exemplar) SetDoubleVal(v float64)
- func (ms Exemplar) SetIntVal(v int64)
- func (ms Exemplar) SetSpanID(v SpanID)
- func (ms Exemplar) SetTimestamp(v Timestamp)
- func (ms Exemplar) SetTraceID(v TraceID)
- func (ms Exemplar) SpanID() SpanID
- func (ms Exemplar) Timestamp() Timestamp
- func (ms Exemplar) TraceID() TraceID
- func (ms Exemplar) Type() MetricValueType
- type ExemplarSlice
- func (es ExemplarSlice) AppendEmpty() Exemplar
- func (es ExemplarSlice) At(ix int) Exemplar
- func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
- func (es ExemplarSlice) EnsureCapacity(newCap int)
- func (es ExemplarSlice) Len() int
- func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice)
- func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool)
- type ExponentialHistogram
- func (ms ExponentialHistogram) AggregationTemporality() MetricAggregationTemporality
- func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram)
- func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice
- func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram)
- func (ms ExponentialHistogram) SetAggregationTemporality(v MetricAggregationTemporality)
- type ExponentialHistogramDataPoint
- func (ms ExponentialHistogramDataPoint) Attributes() AttributeMap
- func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint)
- func (ms ExponentialHistogramDataPoint) Count() uint64
- func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice
- func (ms ExponentialHistogramDataPoint) Flags() MetricDataPointFlags
- func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoint)
- func (ms ExponentialHistogramDataPoint) Negative() Buckets
- func (ms ExponentialHistogramDataPoint) Positive() Buckets
- func (ms ExponentialHistogramDataPoint) Scale() int32
- func (ms ExponentialHistogramDataPoint) SetCount(v uint64)
- func (ms ExponentialHistogramDataPoint) SetFlags(v MetricDataPointFlags)
- func (ms ExponentialHistogramDataPoint) SetScale(v int32)
- func (ms ExponentialHistogramDataPoint) SetStartTimestamp(v Timestamp)
- func (ms ExponentialHistogramDataPoint) SetSum(v float64)
- func (ms ExponentialHistogramDataPoint) SetTimestamp(v Timestamp)
- func (ms ExponentialHistogramDataPoint) SetZeroCount(v uint64)
- func (ms ExponentialHistogramDataPoint) StartTimestamp() Timestamp
- func (ms ExponentialHistogramDataPoint) Sum() float64
- func (ms ExponentialHistogramDataPoint) Timestamp() Timestamp
- func (ms ExponentialHistogramDataPoint) ZeroCount() uint64
- type ExponentialHistogramDataPointSlice
- func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint
- func (es ExponentialHistogramDataPointSlice) At(ix int) ExponentialHistogramDataPoint
- func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice)
- func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int)
- func (es ExponentialHistogramDataPointSlice) Len() int
- func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHistogramDataPointSlice)
- func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogramDataPoint) bool)
- func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHistogramDataPoint) bool) ExponentialHistogramDataPointSlice
- type Gauge
- type Histogram
- type HistogramDataPoint
- func (ms HistogramDataPoint) Attributes() AttributeMap
- func (ms HistogramDataPoint) BucketCounts() []uint64
- func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)
- func (ms HistogramDataPoint) Count() uint64
- func (ms HistogramDataPoint) Exemplars() ExemplarSlice
- func (ms HistogramDataPoint) ExplicitBounds() []float64
- func (ms HistogramDataPoint) Flags() MetricDataPointFlags
- func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint)
- func (ms HistogramDataPoint) SetBucketCounts(v []uint64)
- func (ms HistogramDataPoint) SetCount(v uint64)
- func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
- func (ms HistogramDataPoint) SetFlags(v MetricDataPointFlags)
- func (ms HistogramDataPoint) SetStartTimestamp(v Timestamp)
- func (ms HistogramDataPoint) SetSum(v float64)
- func (ms HistogramDataPoint) SetTimestamp(v Timestamp)
- func (ms HistogramDataPoint) StartTimestamp() Timestamp
- func (ms HistogramDataPoint) Sum() float64
- func (ms HistogramDataPoint) Timestamp() Timestamp
- type HistogramDataPointSlice
- func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint
- func (es HistogramDataPointSlice) At(ix int) HistogramDataPoint
- func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) EnsureCapacity(newCap int)
- func (es HistogramDataPointSlice) Len() int
- func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool)
- func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool) HistogramDataPointSlice
- type InstrumentationLibrary
- func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)
- func (ms InstrumentationLibrary) MoveTo(dest InstrumentationLibrary)
- func (ms InstrumentationLibrary) Name() string
- func (ms InstrumentationLibrary) SetName(v string)
- func (ms InstrumentationLibrary) SetVersion(v string)
- func (ms InstrumentationLibrary) Version() string
- type InstrumentationLibraryLogs
- func (ms InstrumentationLibraryLogs) CopyTo(dest InstrumentationLibraryLogs)
- func (ms InstrumentationLibraryLogs) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibraryLogs) Logs() LogSlice
- func (ms InstrumentationLibraryLogs) MoveTo(dest InstrumentationLibraryLogs)
- func (ms InstrumentationLibraryLogs) SchemaUrl() string
- func (ms InstrumentationLibraryLogs) SetSchemaUrl(v string)
- type InstrumentationLibraryLogsSlice
- func (es InstrumentationLibraryLogsSlice) AppendEmpty() InstrumentationLibraryLogs
- func (es InstrumentationLibraryLogsSlice) At(ix int) InstrumentationLibraryLogs
- func (es InstrumentationLibraryLogsSlice) CopyTo(dest InstrumentationLibraryLogsSlice)
- func (es InstrumentationLibraryLogsSlice) EnsureCapacity(newCap int)
- func (es InstrumentationLibraryLogsSlice) Len() int
- func (es InstrumentationLibraryLogsSlice) MoveAndAppendTo(dest InstrumentationLibraryLogsSlice)
- func (es InstrumentationLibraryLogsSlice) RemoveIf(f func(InstrumentationLibraryLogs) bool)
- func (es InstrumentationLibraryLogsSlice) Sort(less func(a, b InstrumentationLibraryLogs) bool) InstrumentationLibraryLogsSlice
- type InstrumentationLibraryMetrics
- func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)
- func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice
- func (ms InstrumentationLibraryMetrics) MoveTo(dest InstrumentationLibraryMetrics)
- func (ms InstrumentationLibraryMetrics) SchemaUrl() string
- func (ms InstrumentationLibraryMetrics) SetSchemaUrl(v string)
- type InstrumentationLibraryMetricsSlice
- func (es InstrumentationLibraryMetricsSlice) AppendEmpty() InstrumentationLibraryMetrics
- func (es InstrumentationLibraryMetricsSlice) At(ix int) InstrumentationLibraryMetrics
- func (es InstrumentationLibraryMetricsSlice) CopyTo(dest InstrumentationLibraryMetricsSlice)
- func (es InstrumentationLibraryMetricsSlice) EnsureCapacity(newCap int)
- func (es InstrumentationLibraryMetricsSlice) Len() int
- func (es InstrumentationLibraryMetricsSlice) MoveAndAppendTo(dest InstrumentationLibraryMetricsSlice)
- func (es InstrumentationLibraryMetricsSlice) RemoveIf(f func(InstrumentationLibraryMetrics) bool)
- func (es InstrumentationLibraryMetricsSlice) Sort(less func(a, b InstrumentationLibraryMetrics) bool) InstrumentationLibraryMetricsSlice
- type InstrumentationLibrarySpans
- func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)
- func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibrarySpans) MoveTo(dest InstrumentationLibrarySpans)
- func (ms InstrumentationLibrarySpans) SchemaUrl() string
- func (ms InstrumentationLibrarySpans) SetSchemaUrl(v string)
- func (ms InstrumentationLibrarySpans) Spans() SpanSlice
- type InstrumentationLibrarySpansSlice
- func (es InstrumentationLibrarySpansSlice) AppendEmpty() InstrumentationLibrarySpans
- func (es InstrumentationLibrarySpansSlice) At(ix int) InstrumentationLibrarySpans
- func (es InstrumentationLibrarySpansSlice) CopyTo(dest InstrumentationLibrarySpansSlice)
- func (es InstrumentationLibrarySpansSlice) EnsureCapacity(newCap int)
- func (es InstrumentationLibrarySpansSlice) Len() int
- func (es InstrumentationLibrarySpansSlice) MoveAndAppendTo(dest InstrumentationLibrarySpansSlice)
- func (es InstrumentationLibrarySpansSlice) RemoveIf(f func(InstrumentationLibrarySpans) bool)
- func (es InstrumentationLibrarySpansSlice) Sort(less func(a, b InstrumentationLibrarySpans) bool) InstrumentationLibrarySpansSlice
- type LogRecord
- func (ms LogRecord) Attributes() AttributeMap
- func (ms LogRecord) Body() AttributeValue
- func (ms LogRecord) CopyTo(dest LogRecord)
- func (ms LogRecord) DroppedAttributesCount() uint32
- func (ms LogRecord) Flags() uint32
- func (ms LogRecord) MoveTo(dest LogRecord)
- func (ms LogRecord) Name() string
- func (ms LogRecord) SetDroppedAttributesCount(v uint32)
- func (ms LogRecord) SetFlags(v uint32)
- func (ms LogRecord) SetName(v string)
- func (ms LogRecord) SetSeverityNumber(v SeverityNumber)
- func (ms LogRecord) SetSeverityText(v string)
- func (ms LogRecord) SetSpanID(v SpanID)
- func (ms LogRecord) SetTimestamp(v Timestamp)
- func (ms LogRecord) SetTraceID(v TraceID)
- func (ms LogRecord) SeverityNumber() SeverityNumber
- func (ms LogRecord) SeverityText() string
- func (ms LogRecord) SpanID() SpanID
- func (ms LogRecord) Timestamp() Timestamp
- func (ms LogRecord) TraceID() TraceID
- type LogSlice
- func (es LogSlice) AppendEmpty() LogRecord
- func (es LogSlice) At(ix int) LogRecord
- func (es LogSlice) CopyTo(dest LogSlice)
- func (es LogSlice) EnsureCapacity(newCap int)
- func (es LogSlice) Len() int
- func (es LogSlice) MoveAndAppendTo(dest LogSlice)
- func (es LogSlice) RemoveIf(f func(LogRecord) bool)
- func (es LogSlice) Sort(less func(a, b LogRecord) bool) LogSlice
- type Logs
- type LogsMarshaler
- type LogsSizer
- type LogsUnmarshaler
- type Metric
- func (ms Metric) CopyTo(dest Metric)
- func (ms Metric) DataType() MetricDataType
- func (ms Metric) Description() string
- func (ms Metric) ExponentialHistogram() ExponentialHistogram
- func (ms Metric) Gauge() Gauge
- func (ms Metric) Histogram() Histogram
- func (ms Metric) MoveTo(dest Metric)
- func (ms Metric) Name() string
- func (ms Metric) SetDataType(ty MetricDataType)
- func (ms Metric) SetDescription(v string)
- func (ms Metric) SetName(v string)
- func (ms Metric) SetUnit(v string)
- func (ms Metric) Sum() Sum
- func (ms Metric) Summary() Summary
- func (ms Metric) Unit() string
- type MetricAggregationTemporality
- type MetricDataPointFlag
- type MetricDataPointFlags
- type MetricDataType
- type MetricSlice
- func (es MetricSlice) AppendEmpty() Metric
- func (es MetricSlice) At(ix int) Metric
- func (es MetricSlice) CopyTo(dest MetricSlice)
- func (es MetricSlice) EnsureCapacity(newCap int)
- func (es MetricSlice) Len() int
- func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)
- func (es MetricSlice) RemoveIf(f func(Metric) bool)
- func (es MetricSlice) Sort(less func(a, b Metric) bool) MetricSlice
- type MetricValueType
- type Metrics
- type MetricsMarshaler
- type MetricsSizer
- type MetricsUnmarshaler
- type NumberDataPoint
- func (ms NumberDataPoint) Attributes() AttributeMap
- func (ms NumberDataPoint) CopyTo(dest NumberDataPoint)
- func (ms NumberDataPoint) DoubleVal() float64
- func (ms NumberDataPoint) Exemplars() ExemplarSlice
- func (ms NumberDataPoint) Flags() MetricDataPointFlags
- func (ms NumberDataPoint) IntVal() int64
- func (ms NumberDataPoint) MoveTo(dest NumberDataPoint)
- func (ms NumberDataPoint) SetDoubleVal(v float64)
- func (ms NumberDataPoint) SetFlags(v MetricDataPointFlags)
- func (ms NumberDataPoint) SetIntVal(v int64)
- func (ms NumberDataPoint) SetStartTimestamp(v Timestamp)
- func (ms NumberDataPoint) SetTimestamp(v Timestamp)
- func (ms NumberDataPoint) StartTimestamp() Timestamp
- func (ms NumberDataPoint) Timestamp() Timestamp
- func (ms NumberDataPoint) Type() MetricValueType
- type NumberDataPointSlice
- func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint
- func (es NumberDataPointSlice) At(ix int) NumberDataPoint
- func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice)
- func (es NumberDataPointSlice) EnsureCapacity(newCap int)
- func (es NumberDataPointSlice) Len() int
- func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice)
- func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool)
- func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool) NumberDataPointSlice
- type Resource
- type ResourceLogs
- func (ms ResourceLogs) CopyTo(dest ResourceLogs)
- func (ms ResourceLogs) InstrumentationLibraryLogs() InstrumentationLibraryLogsSlice
- func (ms ResourceLogs) MoveTo(dest ResourceLogs)
- func (ms ResourceLogs) Resource() Resource
- func (ms ResourceLogs) SchemaUrl() string
- func (ms ResourceLogs) SetSchemaUrl(v string)
- type ResourceLogsSlice
- func (es ResourceLogsSlice) AppendEmpty() ResourceLogs
- func (es ResourceLogsSlice) At(ix int) ResourceLogs
- func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice)
- func (es ResourceLogsSlice) EnsureCapacity(newCap int)
- func (es ResourceLogsSlice) Len() int
- func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice)
- func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool)
- func (es ResourceLogsSlice) Sort(less func(a, b ResourceLogs) bool) ResourceLogsSlice
- type ResourceMetrics
- func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
- func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice
- func (ms ResourceMetrics) MoveTo(dest ResourceMetrics)
- func (ms ResourceMetrics) Resource() Resource
- func (ms ResourceMetrics) SchemaUrl() string
- func (ms ResourceMetrics) SetSchemaUrl(v string)
- type ResourceMetricsSlice
- func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics
- func (es ResourceMetricsSlice) At(ix int) ResourceMetrics
- func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) EnsureCapacity(newCap int)
- func (es ResourceMetricsSlice) Len() int
- func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool)
- func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool) ResourceMetricsSlice
- type ResourceSpans
- func (ms ResourceSpans) CopyTo(dest ResourceSpans)
- func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice
- func (ms ResourceSpans) MoveTo(dest ResourceSpans)
- func (ms ResourceSpans) Resource() Resource
- func (ms ResourceSpans) SchemaUrl() string
- func (ms ResourceSpans) SetSchemaUrl(v string)
- type ResourceSpansSlice
- func (es ResourceSpansSlice) AppendEmpty() ResourceSpans
- func (es ResourceSpansSlice) At(ix int) ResourceSpans
- func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice)
- func (es ResourceSpansSlice) EnsureCapacity(newCap int)
- func (es ResourceSpansSlice) Len() int
- func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice)
- func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool)
- func (es ResourceSpansSlice) Sort(less func(a, b ResourceSpans) bool) ResourceSpansSlice
- type SeverityNumber
- type Span
- func (ms Span) Attributes() AttributeMap
- func (ms Span) CopyTo(dest Span)
- func (ms Span) DroppedAttributesCount() uint32
- func (ms Span) DroppedEventsCount() uint32
- func (ms Span) DroppedLinksCount() uint32
- func (ms Span) EndTimestamp() Timestamp
- func (ms Span) Events() SpanEventSlice
- func (ms Span) Kind() SpanKind
- func (ms Span) Links() SpanLinkSlice
- func (ms Span) MoveTo(dest Span)
- func (ms Span) Name() string
- func (ms Span) ParentSpanID() SpanID
- func (ms Span) SetDroppedAttributesCount(v uint32)
- func (ms Span) SetDroppedEventsCount(v uint32)
- func (ms Span) SetDroppedLinksCount(v uint32)
- func (ms Span) SetEndTimestamp(v Timestamp)
- func (ms Span) SetKind(v SpanKind)
- func (ms Span) SetName(v string)
- func (ms Span) SetParentSpanID(v SpanID)
- func (ms Span) SetSpanID(v SpanID)
- func (ms Span) SetStartTimestamp(v Timestamp)
- func (ms Span) SetTraceID(v TraceID)
- func (ms Span) SetTraceState(v TraceState)
- func (ms Span) SpanID() SpanID
- func (ms Span) StartTimestamp() Timestamp
- 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) CopyTo(dest SpanEvent)
- func (ms SpanEvent) DroppedAttributesCount() uint32
- func (ms SpanEvent) MoveTo(dest SpanEvent)
- func (ms SpanEvent) Name() string
- func (ms SpanEvent) SetDroppedAttributesCount(v uint32)
- func (ms SpanEvent) SetName(v string)
- func (ms SpanEvent) SetTimestamp(v Timestamp)
- func (ms SpanEvent) Timestamp() Timestamp
- type SpanEventSlice
- func (es SpanEventSlice) AppendEmpty() SpanEvent
- func (es SpanEventSlice) At(ix int) SpanEvent
- func (es SpanEventSlice) CopyTo(dest SpanEventSlice)
- func (es SpanEventSlice) EnsureCapacity(newCap int)
- func (es SpanEventSlice) Len() int
- func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice)
- func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool)
- func (es SpanEventSlice) Sort(less func(a, b SpanEvent) bool) SpanEventSlice
- type SpanID
- type SpanKind
- type SpanLink
- func (ms SpanLink) Attributes() AttributeMap
- func (ms SpanLink) CopyTo(dest SpanLink)
- func (ms SpanLink) DroppedAttributesCount() uint32
- func (ms SpanLink) MoveTo(dest SpanLink)
- 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
- func (es SpanLinkSlice) AppendEmpty() SpanLink
- func (es SpanLinkSlice) At(ix int) SpanLink
- func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice)
- func (es SpanLinkSlice) EnsureCapacity(newCap int)
- func (es SpanLinkSlice) Len() int
- func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice)
- func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool)
- func (es SpanLinkSlice) Sort(less func(a, b SpanLink) bool) SpanLinkSlice
- type SpanSlice
- func (es SpanSlice) AppendEmpty() Span
- func (es SpanSlice) At(ix int) Span
- func (es SpanSlice) CopyTo(dest SpanSlice)
- func (es SpanSlice) EnsureCapacity(newCap int)
- func (es SpanSlice) Len() int
- func (es SpanSlice) MoveAndAppendTo(dest SpanSlice)
- func (es SpanSlice) RemoveIf(f func(Span) bool)
- func (es SpanSlice) Sort(less func(a, b Span) bool) SpanSlice
- type SpanStatus
- type StatusCode
- type Sum
- func (ms Sum) AggregationTemporality() MetricAggregationTemporality
- func (ms Sum) CopyTo(dest Sum)
- func (ms Sum) DataPoints() NumberDataPointSlice
- func (ms Sum) IsMonotonic() bool
- func (ms Sum) MoveTo(dest Sum)
- func (ms Sum) SetAggregationTemporality(v MetricAggregationTemporality)
- func (ms Sum) SetIsMonotonic(v bool)
- type Summary
- type SummaryDataPoint
- func (ms SummaryDataPoint) Attributes() AttributeMap
- func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) Count() uint64
- func (ms SummaryDataPoint) Flags() MetricDataPointFlags
- func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) QuantileValues() ValueAtQuantileSlice
- func (ms SummaryDataPoint) SetCount(v uint64)
- func (ms SummaryDataPoint) SetFlags(v MetricDataPointFlags)
- func (ms SummaryDataPoint) SetStartTimestamp(v Timestamp)
- func (ms SummaryDataPoint) SetSum(v float64)
- func (ms SummaryDataPoint) SetTimestamp(v Timestamp)
- func (ms SummaryDataPoint) StartTimestamp() Timestamp
- func (ms SummaryDataPoint) Sum() float64
- func (ms SummaryDataPoint) Timestamp() Timestamp
- type SummaryDataPointSlice
- func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint
- func (es SummaryDataPointSlice) At(ix int) SummaryDataPoint
- func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) EnsureCapacity(newCap int)
- func (es SummaryDataPointSlice) Len() int
- func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool)
- func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool) SummaryDataPointSlice
- type Timestamp
- type TraceID
- type TraceState
- type Traces
- type TracesMarshaler
- type TracesSizer
- type TracesUnmarshaler
- type ValueAtQuantile
- type ValueAtQuantileSlice
- func (es ValueAtQuantileSlice) AppendEmpty() ValueAtQuantile
- func (es ValueAtQuantileSlice) At(ix int) ValueAtQuantile
- func (es ValueAtQuantileSlice) CopyTo(dest ValueAtQuantileSlice)
- func (es ValueAtQuantileSlice) EnsureCapacity(newCap int)
- func (es ValueAtQuantileSlice) Len() int
- func (es ValueAtQuantileSlice) MoveAndAppendTo(dest ValueAtQuantileSlice)
- func (es ValueAtQuantileSlice) RemoveIf(f func(ValueAtQuantile) bool)
- func (es ValueAtQuantileSlice) Sort(less func(a, b ValueAtQuantile) bool) ValueAtQuantileSlice
Constants ¶
const ( SeverityNumberUNDEFINED = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED) SeverityNumberTRACE = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE) SeverityNumberTRACE2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE2) SeverityNumberTRACE3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE3) SeverityNumberTRACE4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_TRACE4) SeverityNumberDEBUG = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG) SeverityNumberDEBUG2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG2) SeverityNumberDEBUG3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG3) SeverityNumberDEBUG4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_DEBUG4) SeverityNumberINFO = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO) SeverityNumberINFO2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO2) SeverityNumberINFO3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO3) SeverityNumberINFO4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_INFO4) SeverityNumberWARN = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN) SeverityNumberWARN2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN2) SeverityNumberWARN3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN3) SeverityNumberWARN4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_WARN4) SeverityNumberERROR = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR) SeverityNumberERROR2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR2) SeverityNumberERROR3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR3) SeverityNumberERROR4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_ERROR4) SeverityNumberFATAL = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL) SeverityNumberFATAL2 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL2) SeverityNumberFATAL3 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL3) SeverityNumberFATAL4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL4) )
const ( // MetricAggregationTemporalityUnspecified is the default MetricAggregationTemporality, it MUST NOT be used. MetricAggregationTemporalityUnspecified = MetricAggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED) // MetricAggregationTemporalityDelta is a MetricAggregationTemporality for a metric aggregator which reports changes since last report time. MetricAggregationTemporalityDelta = MetricAggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA) // MetricAggregationTemporalityCumulative is a MetricAggregationTemporality for a metric aggregator which reports changes since a fixed start time. MetricAggregationTemporalityCumulative = MetricAggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE) )
const ( // SpanKindUnspecified represents that the SpanKind is unspecified, it MUST NOT be used. SpanKindUnspecified = SpanKind(otlptrace.Span_SPAN_KIND_UNSPECIFIED) // SpanKindInternal indicates that the span represents an internal operation within an application, // as opposed to an operation happening at the boundaries. Default value. SpanKindInternal = SpanKind(otlptrace.Span_SPAN_KIND_INTERNAL) // SpanKindServer indicates that the span covers server-side handling of an RPC or other // remote network request. SpanKindServer = SpanKind(otlptrace.Span_SPAN_KIND_SERVER) // SpanKindClient indicates that the span describes a request to some remote service. SpanKindClient = SpanKind(otlptrace.Span_SPAN_KIND_CLIENT) // SpanKindProducer indicates that the span describes a producer sending a message to a broker. // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship // between producer and consumer spans. // A PRODUCER span ends when the message was accepted by the broker while the logical processing of // the message might span a much longer time. SpanKindProducer = SpanKind(otlptrace.Span_SPAN_KIND_PRODUCER) // SpanKindConsumer indicates that the span describes consumer receiving a message from a broker. // Like the PRODUCER kind, there is often no direct critical path latency relationship between // producer and consumer spans. SpanKindConsumer = SpanKind(otlptrace.Span_SPAN_KIND_CONSUMER) )
const ( StatusCodeUnset = StatusCode(otlptrace.Status_STATUS_CODE_UNSET) StatusCodeOk = StatusCode(otlptrace.Status_STATUS_CODE_OK) StatusCodeError = StatusCode(otlptrace.Status_STATUS_CODE_ERROR) )
const ( // MetricDataPointFlagNoRecordedValue is flag for a metric aggregator which reports changes since last report time. MetricDataPointFlagNoRecordedValue = MetricDataPointFlag(otlpmetrics.DataPointFlags_FLAG_NO_RECORDED_VALUE) )
const ( // MetricDataPointFlagsNone is the default MetricDataPointFlags. MetricDataPointFlagsNone = MetricDataPointFlags(otlpmetrics.DataPointFlags_FLAG_NONE) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 NewAttributeMapFromMap ¶ added in v0.34.0
func NewAttributeMapFromMap(attrMap map[string]AttributeValue) AttributeMap
NewAttributeMapFromMap creates a AttributeMap with values from the given map[string]AttributeValue.
func (AttributeMap) AsRaw ¶ added in v0.35.0
func (am AttributeMap) AsRaw() map[string]interface{}
AsRaw converts an OTLP AttributeMap to a standard go map
func (AttributeMap) Clear ¶
func (am AttributeMap) Clear()
Clear erases any existing entries in this AttributeMap instance.
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) EnsureCapacity ¶
func (am AttributeMap) EnsureCapacity(capacity int)
EnsureCapacity increases the capacity of this AttributeMap instance, if necessary, to ensure that it can hold at least the number of elements specified by the capacity argument.
func (AttributeMap) Get ¶
func (am AttributeMap) Get(key string) (AttributeValue, bool)
Get returns the AttributeValue associated with the key and true. Returned AttributeValue is not a copy, it is a reference to the value stored in this map. It is allowed to modify the returned value using AttributeValue.Set* functions. Such modification will be applied to the value stored in this map.
If the key does not exist returns an invalid instance of the KeyValue and false. Calling any functions on the returned invalid instance will cause a panic.
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)
InsertBool 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) InsertBytes ¶ added in v0.32.0
func (am AttributeMap) InsertBytes(k string, v []byte)
InsertBytes adds the []byte Value to the map when the key does not exist. No action is applied to the map where the key already exists. The caller must ensure the []byte passed in is not modified after the call is made, sharing the data across multiple attributes is forbidden.
func (AttributeMap) InsertDouble ¶
func (am AttributeMap) InsertDouble(k string, v float64)
InsertDouble 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)
InsertInt 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) InsertNull ¶
func (am AttributeMap) InsertNull(k string)
InsertNull adds a null 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)
InsertString 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 "Range" to get access to fewer elements because nil elements are skipped.
func (AttributeMap) Range ¶
func (am AttributeMap) Range(f func(k string, v AttributeValue) bool)
Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.
Example:
sm.Range(func(k string, v AttributeValue) bool { ... })
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)
UpdateBool updates an existing bool Value with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) UpdateBytes ¶ added in v0.32.0
func (am AttributeMap) UpdateBytes(k string, v []byte)
UpdateBytes updates an existing []byte Value with a value. No action is applied to the map where the key does not exist. The caller must ensure the []byte passed in is not modified after the call is made, sharing the data across multiple attributes is forbidden.
func (AttributeMap) UpdateDouble ¶
func (am AttributeMap) UpdateDouble(k string, v float64)
UpdateDouble 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)
UpdateInt 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)
UpdateString 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 inserted 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)
UpsertBool performs the Insert or Update action. The bool Value is inserted 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) UpsertBytes ¶ added in v0.32.0
func (am AttributeMap) UpsertBytes(k string, v []byte)
UpsertBytes performs the Insert or Update action. The []byte Value is inserted to the map that did not originally have the key. The key/value is updated to the map where the key already existed. The caller must ensure the []byte passed in is not modified after the call is made, sharing the data across multiple attributes is forbidden.
func (AttributeMap) UpsertDouble ¶
func (am AttributeMap) UpsertDouble(k string, v float64)
UpsertDouble performs the Insert or Update action. The double Value is inserted 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)
UpsertInt performs the Insert or Update action. The int Value is inserted 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)
UpsertString performs the Insert or Update action. The AttributeValue is inserted 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 is a mutable cell containing the 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.:
func f1(val AttributeValue) { val.SetIntVal(234) } func f2() { v := NewAttributeValueString("a string") f1(v) _ := v.Type() // this will return AttributeValueTypeInt }
Important: zero-initialized instance is not valid for use. All AttributeValue functions below must be called only on instances that are created via NewAttributeValue+ functions.
func NewAttributeValueArray ¶
func NewAttributeValueArray() AttributeValue
NewAttributeValueArray creates a new AttributeValue of array type.
func NewAttributeValueBool ¶
func NewAttributeValueBool(v bool) AttributeValue
NewAttributeValueBool creates a new AttributeValue with the given bool value.
func NewAttributeValueBytes ¶ added in v0.32.0
func NewAttributeValueBytes(v []byte) AttributeValue
NewAttributeValueBytes creates a new AttributeValue with the given []byte value. The caller must ensure the []byte passed in is not modified after the call is made, sharing the data across multiple attributes is forbidden.
func NewAttributeValueDouble ¶
func NewAttributeValueDouble(v float64) AttributeValue
NewAttributeValueDouble creates a new AttributeValue with the given float64 value.
func NewAttributeValueEmpty ¶ added in v0.35.0
func NewAttributeValueEmpty() AttributeValue
NewAttributeValueEmpty creates a new AttributeValue with an empty value.
func NewAttributeValueInt ¶
func NewAttributeValueInt(v int64) AttributeValue
NewAttributeValueInt creates a new AttributeValue with the given int64 value.
func NewAttributeValueMap ¶
func NewAttributeValueMap() AttributeValue
NewAttributeValueMap creates a new AttributeValue of map type.
func NewAttributeValueString ¶
func NewAttributeValueString(v string) AttributeValue
NewAttributeValueString creates a new AttributeValue with the given string value.
func (AttributeValue) AsString ¶ added in v0.34.0
func (a AttributeValue) AsString() string
AsString converts an OTLP AttributeValue object of any type to its equivalent string representation. This differs from StringVal which only returns a non-empty value if the AttributeValueType is AttributeValueTypeString.
func (AttributeValue) BoolVal ¶
func (a AttributeValue) BoolVal() bool
BoolVal returns the bool value associated with this AttributeValue. If the Type() is not AttributeValueTypeBool then returns false. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) BytesVal ¶ added in v0.32.0
func (a AttributeValue) BytesVal() []byte
BytesVal returns the []byte value associated with this AttributeValue. If the Type() is not AttributeValueTypeBytes then returns false. Calling this function on zero-initialized AttributeValue will cause a panic. Modifying the returned []byte in-place is forbidden.
func (AttributeValue) CopyTo ¶
func (a AttributeValue) CopyTo(dest AttributeValue)
CopyTo copies the attribute to a destination.
func (AttributeValue) DoubleVal ¶
func (a AttributeValue) DoubleVal() float64
DoubleVal returns the float64 value associated with this AttributeValue. If the Type() is not AttributeValueTypeDouble then returns 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
IntVal returns the int64 value associated with this AttributeValue. If the Type() is not AttributeValueTypeInt then returns int64(0). Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) MapVal ¶
func (a AttributeValue) MapVal() AttributeMap
MapVal returns the map value associated with this AttributeValue. If the Type() is not AttributeValueTypeMap then returns an empty map. Note that modifying such empty map has no effect on this AttributeValue.
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 AttributeValueTypeBool. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SetBytesVal ¶ added in v0.32.0
func (a AttributeValue) SetBytesVal(v []byte)
SetBytesVal replaces the []byte value associated with this AttributeValue, it also changes the type to be AttributeValueTypeBytes. Calling this function on zero-initialized AttributeValue will cause a panic. The caller must ensure the []byte passed in is not modified after the call is made, sharing the data across multiple attributes is forbidden.
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 AttributeValueTypeDouble. 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 AttributeValueTypeInt. 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 AttributeValueTypeString. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SliceVal ¶ added in v0.39.0
func (a AttributeValue) SliceVal() AttributeValueSlice
SliceVal returns the slice value associated with this AttributeValue. If the Type() is not AttributeValueTypeArray then returns an empty slice. Note that modifying such empty slice has no effect on this AttributeValue.
Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) StringVal ¶
func (a AttributeValue) StringVal() string
StringVal returns the string value associated with this AttributeValue. If the Type() is not AttributeValueTypeString then returns 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 AttributeValueSlice ¶ added in v0.39.0
type AttributeValueSlice struct {
// contains filtered or unexported fields
}
AttributeValueSlice logically represents a slice of AttributeValue.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewAttributeValueSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewAttributeValueSlice ¶ added in v0.39.0
func NewAttributeValueSlice() AttributeValueSlice
NewAttributeValueSlice creates a AttributeValueSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (AttributeValueSlice) AppendEmpty ¶ added in v0.39.0
func (es AttributeValueSlice) AppendEmpty() AttributeValue
AppendEmpty will append to the end of the slice an empty AttributeValue. It returns the newly added AttributeValue.
func (AttributeValueSlice) At ¶ added in v0.39.0
func (es AttributeValueSlice) At(ix int) AttributeValue
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 (AttributeValueSlice) CopyTo ¶ added in v0.39.0
func (es AttributeValueSlice) CopyTo(dest AttributeValueSlice)
CopyTo copies all elements from the current slice to the dest.
func (AttributeValueSlice) EnsureCapacity ¶ added in v0.39.0
func (es AttributeValueSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new AttributeValueSlice can be initialized:
es := NewAttributeValueSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (AttributeValueSlice) Len ¶ added in v0.39.0
func (es AttributeValueSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewAttributeValueSlice()".
func (AttributeValueSlice) MoveAndAppendTo ¶ added in v0.39.0
func (es AttributeValueSlice) MoveAndAppendTo(dest AttributeValueSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (AttributeValueSlice) RemoveIf ¶ added in v0.39.0
func (es AttributeValueSlice) RemoveIf(f func(AttributeValue) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
type AttributeValueType ¶
type AttributeValueType int32
AttributeValueType specifies the type of AttributeValue.
const ( AttributeValueTypeEmpty AttributeValueType = iota AttributeValueTypeString AttributeValueTypeInt AttributeValueTypeDouble AttributeValueTypeBool AttributeValueTypeMap AttributeValueTypeArray AttributeValueTypeBytes )
func (AttributeValueType) String ¶
func (avt AttributeValueType) String() string
String returns the string representation of the AttributeValueType.
type Buckets ¶ added in v0.38.0
type Buckets struct {
// contains filtered or unexported fields
}
Buckets are a set of bucket counts, encoded in a contiguous array of counts.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewBuckets function to create new instances. Important: zero-initialized instance is not valid for use.
func NewBuckets ¶ added in v0.38.0
func NewBuckets() Buckets
NewBuckets creates a new empty Buckets.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Buckets) BucketCounts ¶ added in v0.38.0
BucketCounts returns the bucketcounts associated with this Buckets.
func (Buckets) CopyTo ¶ added in v0.38.0
CopyTo copies all properties from the current struct to the dest.
func (Buckets) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Buckets) SetBucketCounts ¶ added in v0.38.0
SetBucketCounts replaces the bucketcounts associated with this Buckets.
type Exemplar ¶
type Exemplar struct {
// contains filtered or unexported fields
}
Exemplar is a sample input double measurement.
Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExemplar function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExemplar ¶
func NewExemplar() Exemplar
NewExemplar creates a new empty Exemplar.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Exemplar) DoubleVal ¶ added in v0.31.0
DoubleVal returns the doubleval associated with this Exemplar.
func (Exemplar) FilteredAttributes ¶ added in v0.33.0
func (ms Exemplar) FilteredAttributes() AttributeMap
FilteredAttributes returns the FilteredAttributes associated with this Exemplar.
func (Exemplar) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Exemplar) SetDoubleVal ¶ added in v0.31.0
SetDoubleVal replaces the doubleval associated with this Exemplar.
func (Exemplar) SetIntVal ¶ added in v0.31.0
SetIntVal replaces the intval associated with this Exemplar.
func (Exemplar) SetSpanID ¶ added in v0.36.0
SetSpanID replaces the spanid associated with this Exemplar.
func (Exemplar) SetTimestamp ¶
SetTimestamp replaces the timestamp associated with this Exemplar.
func (Exemplar) SetTraceID ¶ added in v0.36.0
SetTraceID replaces the traceid associated with this Exemplar.
func (Exemplar) TraceID ¶ added in v0.36.0
TraceID returns the traceid associated with this Exemplar.
func (Exemplar) Type ¶ added in v0.31.0
func (ms Exemplar) Type() MetricValueType
Type returns the type of the value for this Exemplar. Calling this function on zero-initialized Exemplar will cause a panic.
type ExemplarSlice ¶
type ExemplarSlice struct {
// contains filtered or unexported fields
}
ExemplarSlice logically represents a slice of Exemplar.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewExemplarSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExemplarSlice ¶
func NewExemplarSlice() ExemplarSlice
NewExemplarSlice creates a ExemplarSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ExemplarSlice) AppendEmpty ¶
func (es ExemplarSlice) AppendEmpty() Exemplar
AppendEmpty will append to the end of the slice an empty Exemplar. It returns the newly added Exemplar.
func (ExemplarSlice) At ¶
func (es ExemplarSlice) At(ix int) Exemplar
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 (ExemplarSlice) CopyTo ¶
func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
CopyTo copies all elements from the current slice to the dest.
func (ExemplarSlice) EnsureCapacity ¶
func (es ExemplarSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ExemplarSlice can be initialized:
es := NewExemplarSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ExemplarSlice) Len ¶
func (es ExemplarSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewExemplarSlice()".
func (ExemplarSlice) MoveAndAppendTo ¶
func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ExemplarSlice) RemoveIf ¶
func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
type ExponentialHistogram ¶ added in v0.38.0
type ExponentialHistogram struct {
// contains filtered or unexported fields
}
ExponentialHistogram represents the type of a metric that is calculated by aggregating as a ExponentialHistogram of all reported double measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExponentialHistogram function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogram ¶ added in v0.38.0
func NewExponentialHistogram() ExponentialHistogram
NewExponentialHistogram creates a new empty ExponentialHistogram.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ExponentialHistogram) AggregationTemporality ¶ added in v0.38.0
func (ms ExponentialHistogram) AggregationTemporality() MetricAggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this ExponentialHistogram.
func (ExponentialHistogram) CopyTo ¶ added in v0.38.0
func (ms ExponentialHistogram) CopyTo(dest ExponentialHistogram)
CopyTo copies all properties from the current struct to the dest.
func (ExponentialHistogram) DataPoints ¶ added in v0.38.0
func (ms ExponentialHistogram) DataPoints() ExponentialHistogramDataPointSlice
DataPoints returns the DataPoints associated with this ExponentialHistogram.
func (ExponentialHistogram) MoveTo ¶ added in v0.38.0
func (ms ExponentialHistogram) MoveTo(dest ExponentialHistogram)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ExponentialHistogram) SetAggregationTemporality ¶ added in v0.38.0
func (ms ExponentialHistogram) SetAggregationTemporality(v MetricAggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this ExponentialHistogram.
type ExponentialHistogramDataPoint ¶ added in v0.38.0
type ExponentialHistogramDataPoint struct {
// contains filtered or unexported fields
}
ExponentialHistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains summary statistics for a population of values, it may optionally contain the distribution of those values across a set of buckets.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewExponentialHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogramDataPoint ¶ added in v0.38.0
func NewExponentialHistogramDataPoint() ExponentialHistogramDataPoint
NewExponentialHistogramDataPoint creates a new empty ExponentialHistogramDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ExponentialHistogramDataPoint) Attributes ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Attributes() AttributeMap
Attributes returns the Attributes associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) CopyTo ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) CopyTo(dest ExponentialHistogramDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (ExponentialHistogramDataPoint) Count ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Count() uint64
Count returns the count associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Exemplars ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Flags ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Flags() MetricDataPointFlags
Flags returns the flags associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) MoveTo ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) MoveTo(dest ExponentialHistogramDataPoint)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ExponentialHistogramDataPoint) Negative ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Negative() Buckets
Negative returns the negative associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Positive ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Positive() Buckets
Positive returns the positive associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Scale ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Scale() int32
Scale returns the scale associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetCount ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetFlags ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetFlags(v MetricDataPointFlags)
SetFlags replaces the flags associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetScale ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetScale(v int32)
SetScale replaces the scale associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetStartTimestamp ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetSum ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetTimestamp ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) SetZeroCount ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) SetZeroCount(v uint64)
SetZeroCount replaces the zerocount associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) StartTimestamp ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Sum ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Sum() float64
Sum returns the sum associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) Timestamp ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) Timestamp() Timestamp
Timestamp returns the timestamp associated with this ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPoint) ZeroCount ¶ added in v0.38.0
func (ms ExponentialHistogramDataPoint) ZeroCount() uint64
ZeroCount returns the zerocount associated with this ExponentialHistogramDataPoint.
type ExponentialHistogramDataPointSlice ¶ added in v0.38.0
type ExponentialHistogramDataPointSlice struct {
// contains filtered or unexported fields
}
ExponentialHistogramDataPointSlice logically represents a slice of ExponentialHistogramDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewExponentialHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewExponentialHistogramDataPointSlice ¶ added in v0.38.0
func NewExponentialHistogramDataPointSlice() ExponentialHistogramDataPointSlice
NewExponentialHistogramDataPointSlice creates a ExponentialHistogramDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ExponentialHistogramDataPointSlice) AppendEmpty ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) AppendEmpty() ExponentialHistogramDataPoint
AppendEmpty will append to the end of the slice an empty ExponentialHistogramDataPoint. It returns the newly added ExponentialHistogramDataPoint.
func (ExponentialHistogramDataPointSlice) At ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) At(ix int) ExponentialHistogramDataPoint
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 (ExponentialHistogramDataPointSlice) CopyTo ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) CopyTo(dest ExponentialHistogramDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (ExponentialHistogramDataPointSlice) EnsureCapacity ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ExponentialHistogramDataPointSlice can be initialized:
es := NewExponentialHistogramDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ExponentialHistogramDataPointSlice) Len ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewExponentialHistogramDataPointSlice()".
func (ExponentialHistogramDataPointSlice) MoveAndAppendTo ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) MoveAndAppendTo(dest ExponentialHistogramDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ExponentialHistogramDataPointSlice) RemoveIf ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) RemoveIf(f func(ExponentialHistogramDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ExponentialHistogramDataPointSlice) Sort ¶ added in v0.38.0
func (es ExponentialHistogramDataPointSlice) Sort(less func(a, b ExponentialHistogramDataPoint) bool) ExponentialHistogramDataPointSlice
Sort sorts the ExponentialHistogramDataPoint elements within ExponentialHistogramDataPointSlice given the provided less function so that two instances of ExponentialHistogramDataPointSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b ExponentialHistogramDataPoint) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge represents the type of a double scalar metric that always exports the "current value" for every data point.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewGauge function to create new instances. Important: zero-initialized instance is not valid for use.
func NewGauge ¶
func NewGauge() Gauge
NewGauge creates a new empty Gauge.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Gauge) DataPoints ¶
func (ms Gauge) DataPoints() NumberDataPointSlice
DataPoints returns the DataPoints associated with this Gauge.
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
Histogram represents the type of a metric that is calculated by aggregating as a Histogram of all reported measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogram function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogram ¶
func NewHistogram() Histogram
NewHistogram creates a new empty Histogram.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Histogram) AggregationTemporality ¶
func (ms Histogram) AggregationTemporality() MetricAggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this Histogram.
func (Histogram) DataPoints ¶
func (ms Histogram) DataPoints() HistogramDataPointSlice
DataPoints returns the DataPoints associated with this Histogram.
func (Histogram) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Histogram) SetAggregationTemporality ¶
func (ms Histogram) SetAggregationTemporality(v MetricAggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this Histogram.
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 of values.
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 empty HistogramDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (HistogramDataPoint) Attributes ¶ added in v0.32.0
func (ms HistogramDataPoint) Attributes() AttributeMap
Attributes returns the Attributes associated with this HistogramDataPoint.
func (HistogramDataPoint) BucketCounts ¶
func (ms HistogramDataPoint) BucketCounts() []uint64
BucketCounts returns the bucketcounts associated with this HistogramDataPoint.
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.
func (HistogramDataPoint) Exemplars ¶
func (ms HistogramDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this HistogramDataPoint.
func (HistogramDataPoint) ExplicitBounds ¶
func (ms HistogramDataPoint) ExplicitBounds() []float64
ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint.
func (HistogramDataPoint) Flags ¶ added in v0.37.0
func (ms HistogramDataPoint) Flags() MetricDataPointFlags
Flags returns the flags associated with this HistogramDataPoint.
func (HistogramDataPoint) MoveTo ¶ added in v0.38.0
func (ms HistogramDataPoint) MoveTo(dest HistogramDataPoint)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (HistogramDataPoint) SetBucketCounts ¶
func (ms HistogramDataPoint) SetBucketCounts(v []uint64)
SetBucketCounts replaces the bucketcounts 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) SetFlags ¶ added in v0.37.0
func (ms HistogramDataPoint) SetFlags(v MetricDataPointFlags)
SetFlags replaces the flags associated with this HistogramDataPoint.
func (HistogramDataPoint) SetStartTimestamp ¶
func (ms HistogramDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp 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 Timestamp)
SetTimestamp replaces the timestamp associated with this HistogramDataPoint.
func (HistogramDataPoint) StartTimestamp ¶
func (ms HistogramDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp 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() Timestamp
Timestamp returns the timestamp associated with this HistogramDataPoint.
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 "EnsureCapacity" to initialize with a given capacity.
func (HistogramDataPointSlice) AppendEmpty ¶
func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint
AppendEmpty will append to the end of the slice an empty HistogramDataPoint. It returns the newly added HistogramDataPoint.
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) EnsureCapacity ¶
func (es HistogramDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new HistogramDataPointSlice can be initialized:
es := NewHistogramDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (HistogramDataPointSlice) Sort ¶ added in v0.31.0
func (es HistogramDataPointSlice) Sort(less func(a, b HistogramDataPoint) bool) HistogramDataPointSlice
Sort sorts the HistogramDataPoint elements within HistogramDataPointSlice given the provided less function so that two instances of HistogramDataPointSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b HistogramDataPoint) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
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 empty InstrumentationLibrary.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (InstrumentationLibrary) CopyTo ¶
func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrary) MoveTo ¶ added in v0.38.0
func (ms InstrumentationLibrary) MoveTo(dest InstrumentationLibrary)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
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 InstrumentationLibraryLogs ¶
type InstrumentationLibraryLogs struct {
// contains filtered or unexported fields
}
InstrumentationLibraryLogs is a collection of logs from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibraryLogs function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibraryLogs ¶
func NewInstrumentationLibraryLogs() InstrumentationLibraryLogs
NewInstrumentationLibraryLogs creates a new empty InstrumentationLibraryLogs.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (InstrumentationLibraryLogs) CopyTo ¶
func (ms InstrumentationLibraryLogs) CopyTo(dest InstrumentationLibraryLogs)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibraryLogs) InstrumentationLibrary ¶
func (ms InstrumentationLibraryLogs) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryLogs.
func (InstrumentationLibraryLogs) Logs ¶
func (ms InstrumentationLibraryLogs) Logs() LogSlice
Logs returns the Logs associated with this InstrumentationLibraryLogs.
func (InstrumentationLibraryLogs) MoveTo ¶ added in v0.38.0
func (ms InstrumentationLibraryLogs) MoveTo(dest InstrumentationLibraryLogs)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (InstrumentationLibraryLogs) SchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibraryLogs) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this InstrumentationLibraryLogs.
func (InstrumentationLibraryLogs) SetSchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibraryLogs) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this InstrumentationLibraryLogs.
type InstrumentationLibraryLogsSlice ¶
type InstrumentationLibraryLogsSlice struct {
// contains filtered or unexported fields
}
InstrumentationLibraryLogsSlice logically represents a slice of InstrumentationLibraryLogs.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewInstrumentationLibraryLogsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibraryLogsSlice ¶
func NewInstrumentationLibraryLogsSlice() InstrumentationLibraryLogsSlice
NewInstrumentationLibraryLogsSlice creates a InstrumentationLibraryLogsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (InstrumentationLibraryLogsSlice) AppendEmpty ¶
func (es InstrumentationLibraryLogsSlice) AppendEmpty() InstrumentationLibraryLogs
AppendEmpty will append to the end of the slice an empty InstrumentationLibraryLogs. It returns the newly added InstrumentationLibraryLogs.
func (InstrumentationLibraryLogsSlice) At ¶
func (es InstrumentationLibraryLogsSlice) At(ix int) InstrumentationLibraryLogs
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 (InstrumentationLibraryLogsSlice) CopyTo ¶
func (es InstrumentationLibraryLogsSlice) CopyTo(dest InstrumentationLibraryLogsSlice)
CopyTo copies all elements from the current slice to the dest.
func (InstrumentationLibraryLogsSlice) EnsureCapacity ¶
func (es InstrumentationLibraryLogsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new InstrumentationLibraryLogsSlice can be initialized:
es := NewInstrumentationLibraryLogsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (InstrumentationLibraryLogsSlice) Len ¶
func (es InstrumentationLibraryLogsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewInstrumentationLibraryLogsSlice()".
func (InstrumentationLibraryLogsSlice) MoveAndAppendTo ¶
func (es InstrumentationLibraryLogsSlice) MoveAndAppendTo(dest InstrumentationLibraryLogsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (InstrumentationLibraryLogsSlice) RemoveIf ¶
func (es InstrumentationLibraryLogsSlice) RemoveIf(f func(InstrumentationLibraryLogs) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (InstrumentationLibraryLogsSlice) Sort ¶ added in v0.31.0
func (es InstrumentationLibraryLogsSlice) Sort(less func(a, b InstrumentationLibraryLogs) bool) InstrumentationLibraryLogsSlice
Sort sorts the InstrumentationLibraryLogs elements within InstrumentationLibraryLogsSlice given the provided less function so that two instances of InstrumentationLibraryLogsSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b InstrumentationLibraryLogs) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
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 empty InstrumentationLibraryMetrics.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (InstrumentationLibraryMetrics) CopyTo ¶
func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)
CopyTo copies all properties from the current struct to the dest.
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) MoveTo ¶ added in v0.38.0
func (ms InstrumentationLibraryMetrics) MoveTo(dest InstrumentationLibraryMetrics)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (InstrumentationLibraryMetrics) SchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibraryMetrics) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this InstrumentationLibraryMetrics.
func (InstrumentationLibraryMetrics) SetSchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibraryMetrics) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this InstrumentationLibraryMetrics.
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 "EnsureCapacity" to initialize with a given capacity.
func (InstrumentationLibraryMetricsSlice) AppendEmpty ¶
func (es InstrumentationLibraryMetricsSlice) AppendEmpty() InstrumentationLibraryMetrics
AppendEmpty will append to the end of the slice an empty InstrumentationLibraryMetrics. It returns the newly added InstrumentationLibraryMetrics.
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) EnsureCapacity ¶
func (es InstrumentationLibraryMetricsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new InstrumentationLibraryMetricsSlice can be initialized:
es := NewInstrumentationLibraryMetricsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es InstrumentationLibraryMetricsSlice) RemoveIf(f func(InstrumentationLibraryMetrics) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (InstrumentationLibraryMetricsSlice) Sort ¶ added in v0.31.0
func (es InstrumentationLibraryMetricsSlice) Sort(less func(a, b InstrumentationLibraryMetrics) bool) InstrumentationLibraryMetricsSlice
Sort sorts the InstrumentationLibraryMetrics elements within InstrumentationLibraryMetricsSlice given the provided less function so that two instances of InstrumentationLibraryMetricsSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b InstrumentationLibraryMetrics) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
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 empty InstrumentationLibrarySpans.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (InstrumentationLibrarySpans) CopyTo ¶
func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrarySpans) InstrumentationLibrary ¶
func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibrarySpans.
func (InstrumentationLibrarySpans) MoveTo ¶ added in v0.38.0
func (ms InstrumentationLibrarySpans) MoveTo(dest InstrumentationLibrarySpans)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (InstrumentationLibrarySpans) SchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibrarySpans) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this InstrumentationLibrarySpans.
func (InstrumentationLibrarySpans) SetSchemaUrl ¶ added in v0.32.0
func (ms InstrumentationLibrarySpans) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this InstrumentationLibrarySpans.
func (InstrumentationLibrarySpans) Spans ¶
func (ms InstrumentationLibrarySpans) Spans() SpanSlice
Spans returns the Spans associated with this InstrumentationLibrarySpans.
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 "EnsureCapacity" to initialize with a given capacity.
func (InstrumentationLibrarySpansSlice) AppendEmpty ¶
func (es InstrumentationLibrarySpansSlice) AppendEmpty() InstrumentationLibrarySpans
AppendEmpty will append to the end of the slice an empty InstrumentationLibrarySpans. It returns the newly added InstrumentationLibrarySpans.
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) EnsureCapacity ¶
func (es InstrumentationLibrarySpansSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new InstrumentationLibrarySpansSlice can be initialized:
es := NewInstrumentationLibrarySpansSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es InstrumentationLibrarySpansSlice) RemoveIf(f func(InstrumentationLibrarySpans) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (InstrumentationLibrarySpansSlice) Sort ¶ added in v0.31.0
func (es InstrumentationLibrarySpansSlice) Sort(less func(a, b InstrumentationLibrarySpans) bool) InstrumentationLibrarySpansSlice
Sort sorts the InstrumentationLibrarySpans elements within InstrumentationLibrarySpansSlice given the provided less function so that two instances of InstrumentationLibrarySpansSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b InstrumentationLibrarySpans) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
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 empty LogRecord.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (LogRecord) Attributes ¶
func (ms LogRecord) Attributes() AttributeMap
Attributes returns the Attributes associated with this LogRecord.
func (LogRecord) Body ¶
func (ms LogRecord) Body() AttributeValue
Body returns the body associated with this LogRecord.
func (LogRecord) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this LogRecord.
func (LogRecord) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (LogRecord) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord.
func (LogRecord) SetSeverityNumber ¶
func (ms LogRecord) SetSeverityNumber(v SeverityNumber)
SetSeverityNumber replaces the severitynumber associated with this LogRecord.
func (LogRecord) SetSeverityText ¶
SetSeverityText replaces the severitytext associated with this LogRecord.
func (LogRecord) SetTimestamp ¶
SetTimestamp replaces the timestamp associated with this LogRecord.
func (LogRecord) SetTraceID ¶
SetTraceID replaces the traceid associated with this LogRecord.
func (LogRecord) SeverityNumber ¶
func (ms LogRecord) SeverityNumber() SeverityNumber
SeverityNumber returns the severitynumber associated with this LogRecord.
func (LogRecord) SeverityText ¶
SeverityText returns the severitytext associated with this LogRecord.
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 "EnsureCapacity" to initialize with a given capacity.
func (LogSlice) AppendEmpty ¶
AppendEmpty will append to the end of the slice an empty LogRecord. It returns the newly added LogRecord.
func (LogSlice) At ¶
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) EnsureCapacity ¶
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new LogSlice can be initialized:
es := NewLogSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (LogSlice) Len ¶
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewLogSlice()".
func (LogSlice) MoveAndAppendTo ¶
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (LogSlice) RemoveIf ¶
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (LogSlice) Sort ¶ added in v0.31.0
Sort sorts the LogRecord elements within LogSlice given the provided less function so that two instances of LogSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b LogRecord) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs is the top-level struct that is propagated through the logs pipeline.
This is a reference type (like builtin map).
Must use NewLogs functions to create new instances. Important: zero-initialized instance is not valid for use.
func LogsFromInternalRep ¶
func LogsFromInternalRep(logs internal.LogsWrapper) Logs
LogsFromInternalRep creates the internal Logs representation from the ProtoBuf. Should not be used outside this module. This is intended to be used only by OTLP exporter and File exporter, which legitimately need to work with OTLP Protobuf structs.
func (Logs) InternalRep ¶
func (ld Logs) InternalRep() internal.LogsWrapper
InternalRep returns internal representation of the logs. Should not be used outside this module. This is intended to be used only by OTLP exporter and File exporter, which legitimately need to work with OTLP Protobuf structs.
func (Logs) LogRecordCount ¶
LogRecordCount calculates the total number of log records.
func (Logs) ResourceLogs ¶
func (ld Logs) ResourceLogs() ResourceLogsSlice
ResourceLogs returns the ResourceLogsSlice associated with this Logs.
type LogsMarshaler ¶
type LogsMarshaler interface { // MarshalLogs the given pdata.Logs into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalLogs(ld Logs) ([]byte, error) }
LogsMarshaler marshals pdata.Logs into bytes.
type LogsSizer ¶ added in v0.33.0
type LogsSizer interface { // LogsSize returns the size in bytes of a marshaled Logs. LogsSize(ld Logs) int }
LogsSizer is an optional interface implemented by the LogsMarshaler, that calculates the size of a marshaled Logs.
type LogsUnmarshaler ¶
type LogsUnmarshaler interface { // UnmarshalLogs the given bytes into pdata.Logs. // If the error is not nil, the returned pdata.Logs cannot be used. UnmarshalLogs(buf []byte) (Logs, error) }
LogsUnmarshaler unmarshalls bytes into pdata.Logs.
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/main/opentelemetry/proto/metrics/v1/metrics.proto
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 empty Metric.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Metric) DataType ¶
func (ms Metric) DataType() MetricDataType
DataType returns the type of the data for this Metric. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Description ¶
Description returns the description associated with this Metric.
func (Metric) ExponentialHistogram ¶ added in v0.39.0
func (ms Metric) ExponentialHistogram() ExponentialHistogram
ExponentialHistogram returns the data as ExponentialHistogram. Calling this function when DataType() != MetricDataTypeExponentialHistogram will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Gauge ¶
Gauge returns the data as Gauge. Calling this function when DataType() != MetricDataTypeGauge will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Histogram ¶
Histogram returns the data as Histogram. Calling this function when DataType() != MetricDataTypeHistogram will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Metric) SetDataType ¶
func (ms Metric) SetDataType(ty MetricDataType)
SetDataType clears any existing data and initialize it with an empty data of the given type. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetDescription ¶
SetDescription replaces the description associated with this Metric.
func (Metric) Sum ¶
Sum returns the data as Sum. Calling this function when DataType() != MetricDataTypeSum will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
type MetricAggregationTemporality ¶ added in v0.37.0
type MetricAggregationTemporality int32
MetricAggregationTemporality defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.
func (MetricAggregationTemporality) String ¶ added in v0.37.0
func (at MetricAggregationTemporality) String() string
String returns the string representation of the MetricAggregationTemporality.
type MetricDataPointFlag ¶ added in v0.37.0
type MetricDataPointFlag uint32
MetricDataPointFlag allow users to configure DataPointFlags. This is achieved via NewMetricDataPointFlags. The separation between MetricDataPointFlags and MetricDataPointFlag exists to prevent users accidentally comparing the value of individual flags with MetricDataPointFlags. Instead, users must use the HasFlag method.
type MetricDataPointFlags ¶ added in v0.37.0
type MetricDataPointFlags uint32
MetricDataPointFlags defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.
func NewMetricDataPointFlags ¶ added in v0.37.0
func NewMetricDataPointFlags(flags ...MetricDataPointFlag) MetricDataPointFlags
NewMetricDataPointFlags returns a new MetricDataPointFlags combining the flags passed in as parameters.
func (MetricDataPointFlags) HasFlag ¶ added in v0.37.0
func (d MetricDataPointFlags) HasFlag(flag MetricDataPointFlag) bool
HasFlag returns true if the MetricDataPointFlags contains the specified flag
func (MetricDataPointFlags) String ¶ added in v0.37.0
func (d MetricDataPointFlags) String() string
String returns the string representation of the MetricDataPointFlags.
type MetricDataType ¶
type MetricDataType int32
MetricDataType specifies the type of data in a Metric.
const ( MetricDataTypeNone MetricDataType = iota MetricDataTypeGauge MetricDataTypeSum MetricDataTypeHistogram MetricDataTypeExponentialHistogram MetricDataTypeSummary )
func (MetricDataType) String ¶
func (mdt MetricDataType) String() string
String returns the string representation of the MetricDataType.
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 "EnsureCapacity" to initialize with a given capacity.
func (MetricSlice) AppendEmpty ¶
func (es MetricSlice) AppendEmpty() Metric
AppendEmpty will append to the end of the slice an empty Metric. It returns the newly added Metric.
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) EnsureCapacity ¶
func (es MetricSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new MetricSlice can be initialized:
es := NewMetricSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es MetricSlice) RemoveIf(f func(Metric) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (MetricSlice) Sort ¶ added in v0.31.0
func (es MetricSlice) Sort(less func(a, b Metric) bool) MetricSlice
Sort sorts the Metric elements within MetricSlice given the provided less function so that two instances of MetricSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b Metric) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type MetricValueType ¶ added in v0.31.0
type MetricValueType int32
MetricValueType specifies the type of NumberDataPoint.
const ( MetricValueTypeNone MetricValueType = iota MetricValueTypeInt MetricValueTypeDouble )
func (MetricValueType) String ¶ added in v0.39.0
func (mdt MetricValueType) String() string
String returns the string representation of the MetricValueType.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is an opaque interface that allows transition to the new internal Metrics data, but also facilitates 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.
func MetricsFromInternalRep ¶
func MetricsFromInternalRep(wrapper internal.MetricsWrapper) Metrics
MetricsFromInternalRep creates Metrics from the internal representation. Should not be used outside this module.
func (Metrics) DataPointCount ¶
DataPointCount calculates the total number of data points.
func (Metrics) InternalRep ¶
func (md Metrics) InternalRep() internal.MetricsWrapper
InternalRep returns internal representation of the Metrics. Should not be used outside this module.
func (Metrics) MetricCount ¶
MetricCount calculates the total number of metrics.
func (Metrics) ResourceMetrics ¶
func (md Metrics) ResourceMetrics() ResourceMetricsSlice
ResourceMetrics returns the ResourceMetricsSlice associated with this Metrics.
type MetricsMarshaler ¶
type MetricsMarshaler interface { // MarshalMetrics the given pdata.Metrics into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalMetrics(md Metrics) ([]byte, error) }
MetricsMarshaler marshals pdata.Metrics into bytes.
type MetricsSizer ¶ added in v0.33.0
type MetricsSizer interface { // MetricsSize returns the size in bytes of a marshaled Metrics. MetricsSize(md Metrics) int }
MetricsSizer is an optional interface implemented by the MetricsMarshaler, that calculates the size of a marshaled Metrics.
type MetricsUnmarshaler ¶
type MetricsUnmarshaler interface { // UnmarshalMetrics the given bytes into pdata.Metrics. // If the error is not nil, the returned pdata.Metrics cannot be used. UnmarshalMetrics(buf []byte) (Metrics, error) }
MetricsUnmarshaler unmarshalls bytes into pdata.Metrics.
type NumberDataPoint ¶ added in v0.31.0
type NumberDataPoint struct {
// contains filtered or unexported fields
}
NumberDataPoint is a single data point in a timeseries that describes the time-varying value of a number metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewNumberDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewNumberDataPoint ¶ added in v0.31.0
func NewNumberDataPoint() NumberDataPoint
NewNumberDataPoint creates a new empty NumberDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (NumberDataPoint) Attributes ¶ added in v0.32.0
func (ms NumberDataPoint) Attributes() AttributeMap
Attributes returns the Attributes associated with this NumberDataPoint.
func (NumberDataPoint) CopyTo ¶ added in v0.31.0
func (ms NumberDataPoint) CopyTo(dest NumberDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (NumberDataPoint) DoubleVal ¶ added in v0.31.0
func (ms NumberDataPoint) DoubleVal() float64
DoubleVal returns the doubleval associated with this NumberDataPoint.
func (NumberDataPoint) Exemplars ¶ added in v0.31.0
func (ms NumberDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this NumberDataPoint.
func (NumberDataPoint) Flags ¶ added in v0.37.0
func (ms NumberDataPoint) Flags() MetricDataPointFlags
Flags returns the flags associated with this NumberDataPoint.
func (NumberDataPoint) IntVal ¶ added in v0.31.0
func (ms NumberDataPoint) IntVal() int64
IntVal returns the intval associated with this NumberDataPoint.
func (NumberDataPoint) MoveTo ¶ added in v0.38.0
func (ms NumberDataPoint) MoveTo(dest NumberDataPoint)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (NumberDataPoint) SetDoubleVal ¶ added in v0.31.0
func (ms NumberDataPoint) SetDoubleVal(v float64)
SetDoubleVal replaces the doubleval associated with this NumberDataPoint.
func (NumberDataPoint) SetFlags ¶ added in v0.37.0
func (ms NumberDataPoint) SetFlags(v MetricDataPointFlags)
SetFlags replaces the flags associated with this NumberDataPoint.
func (NumberDataPoint) SetIntVal ¶ added in v0.31.0
func (ms NumberDataPoint) SetIntVal(v int64)
SetIntVal replaces the intval associated with this NumberDataPoint.
func (NumberDataPoint) SetStartTimestamp ¶ added in v0.31.0
func (ms NumberDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this NumberDataPoint.
func (NumberDataPoint) SetTimestamp ¶ added in v0.31.0
func (ms NumberDataPoint) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this NumberDataPoint.
func (NumberDataPoint) StartTimestamp ¶ added in v0.31.0
func (ms NumberDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp associated with this NumberDataPoint.
func (NumberDataPoint) Timestamp ¶ added in v0.31.0
func (ms NumberDataPoint) Timestamp() Timestamp
Timestamp returns the timestamp associated with this NumberDataPoint.
func (NumberDataPoint) Type ¶ added in v0.31.0
func (ms NumberDataPoint) Type() MetricValueType
Type returns the type of the value for this NumberDataPoint. Calling this function on zero-initialized NumberDataPoint will cause a panic.
type NumberDataPointSlice ¶ added in v0.31.0
type NumberDataPointSlice struct {
// contains filtered or unexported fields
}
NumberDataPointSlice logically represents a slice of NumberDataPoint.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewNumberDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewNumberDataPointSlice ¶ added in v0.31.0
func NewNumberDataPointSlice() NumberDataPointSlice
NewNumberDataPointSlice creates a NumberDataPointSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (NumberDataPointSlice) AppendEmpty ¶ added in v0.31.0
func (es NumberDataPointSlice) AppendEmpty() NumberDataPoint
AppendEmpty will append to the end of the slice an empty NumberDataPoint. It returns the newly added NumberDataPoint.
func (NumberDataPointSlice) At ¶ added in v0.31.0
func (es NumberDataPointSlice) At(ix int) NumberDataPoint
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 (NumberDataPointSlice) CopyTo ¶ added in v0.31.0
func (es NumberDataPointSlice) CopyTo(dest NumberDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (NumberDataPointSlice) EnsureCapacity ¶ added in v0.31.0
func (es NumberDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new NumberDataPointSlice can be initialized:
es := NewNumberDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (NumberDataPointSlice) Len ¶ added in v0.31.0
func (es NumberDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewNumberDataPointSlice()".
func (NumberDataPointSlice) MoveAndAppendTo ¶ added in v0.31.0
func (es NumberDataPointSlice) MoveAndAppendTo(dest NumberDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (NumberDataPointSlice) RemoveIf ¶ added in v0.31.0
func (es NumberDataPointSlice) RemoveIf(f func(NumberDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (NumberDataPointSlice) Sort ¶ added in v0.31.0
func (es NumberDataPointSlice) Sort(less func(a, b NumberDataPoint) bool) NumberDataPointSlice
Sort sorts the NumberDataPoint elements within NumberDataPointSlice given the provided less function so that two instances of NumberDataPointSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b NumberDataPoint) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource is a message representing the 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 empty Resource.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Resource) Attributes ¶
func (ms Resource) Attributes() AttributeMap
Attributes returns the Attributes associated with this Resource.
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 empty ResourceLogs.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ResourceLogs) CopyTo ¶
func (ms ResourceLogs) CopyTo(dest ResourceLogs)
CopyTo copies all properties from the current struct to the dest.
func (ResourceLogs) InstrumentationLibraryLogs ¶
func (ms ResourceLogs) InstrumentationLibraryLogs() InstrumentationLibraryLogsSlice
InstrumentationLibraryLogs returns the InstrumentationLibraryLogs associated with this ResourceLogs.
func (ResourceLogs) MoveTo ¶ added in v0.38.0
func (ms ResourceLogs) MoveTo(dest ResourceLogs)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ResourceLogs) Resource ¶
func (ms ResourceLogs) Resource() Resource
Resource returns the resource associated with this ResourceLogs.
func (ResourceLogs) SchemaUrl ¶ added in v0.32.0
func (ms ResourceLogs) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this ResourceLogs.
func (ResourceLogs) SetSchemaUrl ¶ added in v0.32.0
func (ms ResourceLogs) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this ResourceLogs.
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 "EnsureCapacity" to initialize with a given capacity.
func (ResourceLogsSlice) AppendEmpty ¶
func (es ResourceLogsSlice) AppendEmpty() ResourceLogs
AppendEmpty will append to the end of the slice an empty ResourceLogs. It returns the newly added ResourceLogs.
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) EnsureCapacity ¶
func (es ResourceLogsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ResourceLogsSlice can be initialized:
es := NewResourceLogsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ResourceLogsSlice) Sort ¶ added in v0.31.0
func (es ResourceLogsSlice) Sort(less func(a, b ResourceLogs) bool) ResourceLogsSlice
Sort sorts the ResourceLogs elements within ResourceLogsSlice given the provided less function so that two instances of ResourceLogsSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b ResourceLogs) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
ResourceMetrics is a collection of metrics from a Resource.
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 empty ResourceMetrics.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ResourceMetrics) CopyTo ¶
func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
CopyTo copies all properties from the current struct to the dest.
func (ResourceMetrics) InstrumentationLibraryMetrics ¶
func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice
InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics.
func (ResourceMetrics) MoveTo ¶ added in v0.38.0
func (ms ResourceMetrics) MoveTo(dest ResourceMetrics)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ResourceMetrics) Resource ¶
func (ms ResourceMetrics) Resource() Resource
Resource returns the resource associated with this ResourceMetrics.
func (ResourceMetrics) SchemaUrl ¶ added in v0.32.0
func (ms ResourceMetrics) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this ResourceMetrics.
func (ResourceMetrics) SetSchemaUrl ¶ added in v0.32.0
func (ms ResourceMetrics) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this ResourceMetrics.
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 NewResourceMetricsSlice ¶
func NewResourceMetricsSlice() ResourceMetricsSlice
NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ResourceMetricsSlice) AppendEmpty ¶
func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics
AppendEmpty will append to the end of the slice an empty ResourceMetrics. It returns the newly added ResourceMetrics.
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) EnsureCapacity ¶
func (es ResourceMetricsSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ResourceMetricsSlice can be initialized:
es := NewResourceMetricsSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ResourceMetricsSlice) Sort ¶ added in v0.31.0
func (es ResourceMetricsSlice) Sort(less func(a, b ResourceMetrics) bool) ResourceMetricsSlice
Sort sorts the ResourceMetrics elements within ResourceMetricsSlice given the provided less function so that two instances of ResourceMetricsSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b ResourceMetrics) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type ResourceSpans ¶
type ResourceSpans struct {
// contains filtered or unexported fields
}
ResourceSpans is a collection of spans from a Resource.
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 empty ResourceSpans.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ResourceSpans) CopyTo ¶
func (ms ResourceSpans) CopyTo(dest ResourceSpans)
CopyTo copies all properties from the current struct to the dest.
func (ResourceSpans) InstrumentationLibrarySpans ¶
func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice
InstrumentationLibrarySpans returns the InstrumentationLibrarySpans associated with this ResourceSpans.
func (ResourceSpans) MoveTo ¶ added in v0.38.0
func (ms ResourceSpans) MoveTo(dest ResourceSpans)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ResourceSpans) Resource ¶
func (ms ResourceSpans) Resource() Resource
Resource returns the resource associated with this ResourceSpans.
func (ResourceSpans) SchemaUrl ¶ added in v0.32.0
func (ms ResourceSpans) SchemaUrl() string
SchemaUrl returns the schemaurl associated with this ResourceSpans.
func (ResourceSpans) SetSchemaUrl ¶ added in v0.32.0
func (ms ResourceSpans) SetSchemaUrl(v string)
SetSchemaUrl replaces the schemaurl associated with this ResourceSpans.
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 "EnsureCapacity" to initialize with a given capacity.
func (ResourceSpansSlice) AppendEmpty ¶
func (es ResourceSpansSlice) AppendEmpty() ResourceSpans
AppendEmpty will append to the end of the slice an empty ResourceSpans. It returns the newly added ResourceSpans.
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) EnsureCapacity ¶
func (es ResourceSpansSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ResourceSpansSlice can be initialized:
es := NewResourceSpansSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ResourceSpansSlice) Sort ¶ added in v0.31.0
func (es ResourceSpansSlice) Sort(less func(a, b ResourceSpans) bool) ResourceSpansSlice
Sort sorts the ResourceSpans elements within ResourceSpansSlice given the provided less function so that two instances of ResourceSpansSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b ResourceSpans) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type SeverityNumber ¶
type SeverityNumber int32
SeverityNumber is the public alias of otlplogs.SeverityNumber from internal package.
func (SeverityNumber) String ¶
func (sn SeverityNumber) String() string
String returns the string representation of the SeverityNumber.
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/main/opentelemetry/proto/trace/v1/trace.proto
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 empty Span.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
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) EndTimestamp ¶
EndTimestamp returns the endtimestamp 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) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Span) ParentSpanID ¶
ParentSpanID returns the parentspanid associated with this Span.
func (Span) SetDroppedAttributesCount ¶
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) SetEndTimestamp ¶
SetEndTimestamp replaces the endtimestamp associated with this Span.
func (Span) SetParentSpanID ¶
SetParentSpanID replaces the parentspanid associated with this Span.
func (Span) SetStartTimestamp ¶
SetStartTimestamp replaces the starttimestamp 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) StartTimestamp ¶
StartTimestamp returns the starttimestamp 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 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 empty SpanEvent.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
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) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (SpanEvent) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent.
func (SpanEvent) SetTimestamp ¶
SetTimestamp replaces the timestamp associated with this SpanEvent.
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 "EnsureCapacity" to initialize with a given capacity.
func (SpanEventSlice) AppendEmpty ¶
func (es SpanEventSlice) AppendEmpty() SpanEvent
AppendEmpty will append to the end of the slice an empty SpanEvent. It returns the newly added SpanEvent.
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) EnsureCapacity ¶
func (es SpanEventSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SpanEventSlice can be initialized:
es := NewSpanEventSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SpanEventSlice) Sort ¶ added in v0.31.0
func (es SpanEventSlice) Sort(less func(a, b SpanEvent) bool) SpanEventSlice
Sort sorts the SpanEvent elements within SpanEventSlice given the provided less function so that two instances of SpanEventSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b SpanEvent) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type SpanID ¶
type SpanID struct {
// contains filtered or unexported fields
}
SpanID is an alias of OTLP SpanID data type.
func InvalidSpanID ¶
func InvalidSpanID() SpanID
InvalidSpanID returns an empty (all zero bytes) SpanID.
type SpanKind ¶
type SpanKind int32
SpanKind is the type of span. Can be used to specify additional relationships between spans in addition to a parent/child relationship.
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 Link definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto
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 ¶
func NewSpanLink() SpanLink
NewSpanLink creates a new empty SpanLink.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
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) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (SpanLink) SetDroppedAttributesCount ¶
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 ¶
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 "EnsureCapacity" to initialize with a given capacity.
func (SpanLinkSlice) AppendEmpty ¶
func (es SpanLinkSlice) AppendEmpty() SpanLink
AppendEmpty will append to the end of the slice an empty SpanLink. It returns the newly added SpanLink.
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) EnsureCapacity ¶
func (es SpanLinkSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SpanLinkSlice can be initialized:
es := NewSpanLinkSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SpanLinkSlice) Sort ¶ added in v0.31.0
func (es SpanLinkSlice) Sort(less func(a, b SpanLink) bool) SpanLinkSlice
Sort sorts the SpanLink elements within SpanLinkSlice given the provided less function so that two instances of SpanLinkSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b SpanLink) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
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 "EnsureCapacity" to initialize with a given capacity.
func (SpanSlice) AppendEmpty ¶
AppendEmpty will append to the end of the slice an empty Span. It returns the newly added Span.
func (SpanSlice) At ¶
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) EnsureCapacity ¶
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SpanSlice can be initialized:
es := NewSpanSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (SpanSlice) Len ¶
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSpanSlice()".
func (SpanSlice) MoveAndAppendTo ¶
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SpanSlice) RemoveIf ¶
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SpanSlice) Sort ¶ added in v0.31.0
Sort sorts the Span elements within SpanSlice given the provided less function so that two instances of SpanSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b Span) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type SpanStatus ¶
type SpanStatus struct {
// contains filtered or unexported fields
}
SpanStatus is an optional final status for this span. Semantically, when Status was not set, that means the span ended without errors and to 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 empty SpanStatus.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (SpanStatus) Code ¶
func (ms SpanStatus) Code() StatusCode
Code returns the code associated with this SpanStatus.
func (SpanStatus) CopyTo ¶
func (ms SpanStatus) CopyTo(dest SpanStatus)
CopyTo copies all properties from the current struct to the dest.
func (SpanStatus) Message ¶
func (ms SpanStatus) Message() string
Message returns the message associated with this SpanStatus.
func (SpanStatus) MoveTo ¶ added in v0.38.0
func (ms SpanStatus) MoveTo(dest SpanStatus)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (SpanStatus) SetCode ¶
func (ms SpanStatus) SetCode(v StatusCode)
SetCode replaces the code associated with this SpanStatus.
func (SpanStatus) SetMessage ¶
func (ms SpanStatus) SetMessage(v string)
SetMessage replaces the message associated with this SpanStatus.
type StatusCode ¶
type StatusCode int32
StatusCode mirrors the codes defined at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
func (StatusCode) String ¶
func (sc StatusCode) String() string
String returns the string representation of the StatusCode.
type Sum ¶
type Sum struct {
// contains filtered or unexported fields
}
Sum represents the type of a numeric double scalar metric that is calculated as a sum of all reported measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSum function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSum ¶
func NewSum() Sum
NewSum creates a new empty Sum.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Sum) AggregationTemporality ¶
func (ms Sum) AggregationTemporality() MetricAggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this Sum.
func (Sum) DataPoints ¶
func (ms Sum) DataPoints() NumberDataPointSlice
DataPoints returns the DataPoints associated with this Sum.
func (Sum) IsMonotonic ¶
IsMonotonic returns the ismonotonic associated with this Sum.
func (Sum) MoveTo ¶ added in v0.38.0
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (Sum) SetAggregationTemporality ¶
func (ms Sum) SetAggregationTemporality(v MetricAggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this Sum.
func (Sum) SetIsMonotonic ¶
SetIsMonotonic replaces the ismonotonic associated with this Sum.
type Summary ¶
type Summary struct {
// contains filtered or unexported fields
}
Summary represents the type of a metric that is calculated by aggregating as a Summary of all reported double measurements over a time interval.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummary function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummary ¶
func NewSummary() Summary
NewSummary creates a new empty Summary.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (Summary) DataPoints ¶
func (ms Summary) DataPoints() SummaryDataPointSlice
DataPoints returns the DataPoints associated with this Summary.
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 of double values.
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 empty SummaryDataPoint.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (SummaryDataPoint) Attributes ¶ added in v0.32.0
func (ms SummaryDataPoint) Attributes() AttributeMap
Attributes returns the Attributes associated with this SummaryDataPoint.
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.
func (SummaryDataPoint) Flags ¶ added in v0.37.0
func (ms SummaryDataPoint) Flags() MetricDataPointFlags
Flags returns the flags associated with this SummaryDataPoint.
func (SummaryDataPoint) MoveTo ¶ added in v0.38.0
func (ms SummaryDataPoint) MoveTo(dest SummaryDataPoint)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (SummaryDataPoint) QuantileValues ¶
func (ms SummaryDataPoint) QuantileValues() ValueAtQuantileSlice
QuantileValues returns the QuantileValues associated with this SummaryDataPoint.
func (SummaryDataPoint) SetCount ¶
func (ms SummaryDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this SummaryDataPoint.
func (SummaryDataPoint) SetFlags ¶ added in v0.37.0
func (ms SummaryDataPoint) SetFlags(v MetricDataPointFlags)
SetFlags replaces the flags associated with this SummaryDataPoint.
func (SummaryDataPoint) SetStartTimestamp ¶
func (ms SummaryDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp 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 Timestamp)
SetTimestamp replaces the timestamp associated with this SummaryDataPoint.
func (SummaryDataPoint) StartTimestamp ¶
func (ms SummaryDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp 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() Timestamp
Timestamp returns the timestamp associated with this SummaryDataPoint.
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 "EnsureCapacity" to initialize with a given capacity.
func (SummaryDataPointSlice) AppendEmpty ¶
func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint
AppendEmpty will append to the end of the slice an empty SummaryDataPoint. It returns the newly added SummaryDataPoint.
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) EnsureCapacity ¶
func (es SummaryDataPointSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new SummaryDataPointSlice can be initialized:
es := NewSummaryDataPointSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
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) RemoveIf ¶
func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SummaryDataPointSlice) Sort ¶ added in v0.31.0
func (es SummaryDataPointSlice) Sort(less func(a, b SummaryDataPoint) bool) SummaryDataPointSlice
Sort sorts the SummaryDataPoint elements within SummaryDataPointSlice given the provided less function so that two instances of SummaryDataPointSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b SummaryDataPoint) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))
type Timestamp ¶
type Timestamp uint64
Timestamp is a time specified as UNIX Epoch time in nanoseconds since 1970-01-01 00:00:00 +0000 UTC.
func NewTimestampFromTime ¶ added in v0.34.0
NewTimestampFromTime constructs a new Timestamp from the provided time.Time.
type TraceID ¶
type TraceID struct {
// contains filtered or unexported fields
}
TraceID is an alias of OTLP TraceID data type.
func InvalidTraceID ¶
func InvalidTraceID() TraceID
InvalidTraceID returns an empty (all zero bytes) TraceID.
func NewTraceID ¶
NewTraceID returns a new TraceID from the given byte array.
type TraceState ¶
type TraceState string
TraceState is a string representing the tracestate in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
const ( // TraceStateEmpty represents the empty TraceState. TraceStateEmpty TraceState = "" )
type Traces ¶
type Traces struct {
// contains filtered or unexported fields
}
Traces is the top-level struct that is propagated through the traces pipeline.
func TracesFromInternalRep ¶
func TracesFromInternalRep(wrapper internal.TracesWrapper) Traces
TracesFromInternalRep creates Traces from the internal representation. Should not be used outside this module.
func (Traces) InternalRep ¶
func (td Traces) InternalRep() internal.TracesWrapper
InternalRep returns internal representation of the Traces. Should not be used outside this module.
func (Traces) ResourceSpans ¶
func (td Traces) ResourceSpans() ResourceSpansSlice
ResourceSpans returns the ResourceSpansSlice associated with this Metrics.
type TracesMarshaler ¶
type TracesMarshaler interface { // MarshalTraces the given pdata.Traces into bytes. // If the error is not nil, the returned bytes slice cannot be used. MarshalTraces(td Traces) ([]byte, error) }
TracesMarshaler marshals pdata.Traces into bytes.
type TracesSizer ¶ added in v0.33.0
type TracesSizer interface { // TracesSize returns the size in bytes of a marshaled Traces. TracesSize(td Traces) int }
TracesSizer is an optional interface implemented by the TracesMarshaler, that calculates the size of a marshaled Traces.
type TracesUnmarshaler ¶
type TracesUnmarshaler interface { // UnmarshalTraces the given bytes into pdata.Traces. // If the error is not nil, the returned pdata.Traces cannot be used. UnmarshalTraces(buf []byte) (Traces, error) }
TracesUnmarshaler unmarshalls bytes into pdata.Traces.
type ValueAtQuantile ¶
type ValueAtQuantile struct {
// contains filtered or unexported fields
}
ValueAtQuantile is a quantile value within a Summary data point.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewValueAtQuantile function to create new instances. Important: zero-initialized instance is not valid for use.
func NewValueAtQuantile ¶
func NewValueAtQuantile() ValueAtQuantile
NewValueAtQuantile creates a new empty ValueAtQuantile.
This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, OR directly access the member if this is embedded in another struct.
func (ValueAtQuantile) CopyTo ¶
func (ms ValueAtQuantile) CopyTo(dest ValueAtQuantile)
CopyTo copies all properties from the current struct to the dest.
func (ValueAtQuantile) MoveTo ¶ added in v0.38.0
func (ms ValueAtQuantile) MoveTo(dest ValueAtQuantile)
MoveTo moves all properties from the current struct to dest resetting the current instance to its zero value
func (ValueAtQuantile) Quantile ¶
func (ms ValueAtQuantile) Quantile() float64
Quantile returns the quantile associated with this ValueAtQuantile.
func (ValueAtQuantile) SetQuantile ¶
func (ms ValueAtQuantile) SetQuantile(v float64)
SetQuantile replaces the quantile associated with this ValueAtQuantile.
func (ValueAtQuantile) SetValue ¶
func (ms ValueAtQuantile) SetValue(v float64)
SetValue replaces the value associated with this ValueAtQuantile.
func (ValueAtQuantile) Value ¶
func (ms ValueAtQuantile) Value() float64
Value returns the value associated with this ValueAtQuantile.
type ValueAtQuantileSlice ¶
type ValueAtQuantileSlice struct {
// contains filtered or unexported fields
}
ValueAtQuantileSlice logically represents a slice of ValueAtQuantile.
This is a reference type. If passed by value and callee modifies it, the caller will see the modification.
Must use NewValueAtQuantileSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewValueAtQuantileSlice ¶
func NewValueAtQuantileSlice() ValueAtQuantileSlice
NewValueAtQuantileSlice creates a ValueAtQuantileSlice with 0 elements. Can use "EnsureCapacity" to initialize with a given capacity.
func (ValueAtQuantileSlice) AppendEmpty ¶
func (es ValueAtQuantileSlice) AppendEmpty() ValueAtQuantile
AppendEmpty will append to the end of the slice an empty ValueAtQuantile. It returns the newly added ValueAtQuantile.
func (ValueAtQuantileSlice) At ¶
func (es ValueAtQuantileSlice) At(ix int) ValueAtQuantile
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 (ValueAtQuantileSlice) CopyTo ¶
func (es ValueAtQuantileSlice) CopyTo(dest ValueAtQuantileSlice)
CopyTo copies all elements from the current slice to the dest.
func (ValueAtQuantileSlice) EnsureCapacity ¶
func (es ValueAtQuantileSlice) EnsureCapacity(newCap int)
EnsureCapacity is an operation that ensures the slice has at least the specified capacity. 1. If the newCap <= cap then no change in capacity. 2. If the newCap > cap then the slice capacity will be expanded to equal newCap.
Here is how a new ValueAtQuantileSlice can be initialized:
es := NewValueAtQuantileSlice() es.EnsureCapacity(4) for i := 0; i < 4; i++ { e := es.AppendEmpty() // Here should set all the values for e. }
func (ValueAtQuantileSlice) Len ¶
func (es ValueAtQuantileSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewValueAtQuantileSlice()".
func (ValueAtQuantileSlice) MoveAndAppendTo ¶
func (es ValueAtQuantileSlice) MoveAndAppendTo(dest ValueAtQuantileSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ValueAtQuantileSlice) RemoveIf ¶
func (es ValueAtQuantileSlice) RemoveIf(f func(ValueAtQuantile) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (ValueAtQuantileSlice) Sort ¶ added in v0.31.0
func (es ValueAtQuantileSlice) Sort(less func(a, b ValueAtQuantile) bool) ValueAtQuantileSlice
Sort sorts the ValueAtQuantile elements within ValueAtQuantileSlice given the provided less function so that two instances of ValueAtQuantileSlice can be compared.
Returns the same instance to allow nicer code like:
lessFunc := func(a, b ValueAtQuantile) bool { return a.Name() < b.Name() // choose any comparison here } assert.EqualValues(t, expected.Sort(lessFunc), actual.Sort(lessFunc))