Documentation ¶
Overview ¶
Package pdata (pipeline data) implements data structures that represent telemetry data in-memory. All data received is converted into this format and travels through the pipeline in this format and that is converted from this format by exporters when sending.
Current implementation primarily uses OTLP ProtoBuf structs as the underlying data structures for many of of the declared structs. We keep a pointer to OTLP protobuf in the "orig" member field. This allows efficient translation to/from OTLP wire protocol. Note that the underlying data structure is kept private so that in the future we are free to make changes to it to make more optimal.
Most of internal data structures must be created via New* functions. Zero-initialized structures in most cases are not valid (read comments for each struct to know if it is the case). This is a slight deviation from idiomatic Go to avoid unnecessary pointer checks in dozens of functions which assume the invariant that "orig" member is non-nil. Several structures also provide New*Slice functions that allows to create more than one instance of the struct more efficiently instead of calling New* repeatedly. Use it where appropriate.
Index ¶
- Constants
- type AggregationTemporality
- type AnyValueArray
- func (es AnyValueArray) Append(e AttributeValue)
- func (es AnyValueArray) AppendEmpty() AttributeValue
- func (es AnyValueArray) At(ix int) AttributeValue
- func (es AnyValueArray) CopyTo(dest AnyValueArray)
- func (es AnyValueArray) Len() int
- func (es AnyValueArray) MoveAndAppendTo(dest AnyValueArray)
- func (es AnyValueArray) RemoveIf(f func(AttributeValue) bool)
- func (es AnyValueArray) Resize(newLen int)
- type AttributeMap
- 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) InitFromMap(attrMap map[string]AttributeValue) AttributeMap
- func (am AttributeMap) Insert(k string, v AttributeValue)
- func (am AttributeMap) InsertBool(k string, v bool)
- 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) 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) 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 NewAttributeValueDouble(v float64) AttributeValue
- func NewAttributeValueInt(v int64) AttributeValue
- func NewAttributeValueMap() AttributeValue
- func NewAttributeValueNull() AttributeValue
- func NewAttributeValueString(v string) AttributeValue
- func (a AttributeValue) ArrayVal() AnyValueArray
- func (a AttributeValue) BoolVal() bool
- 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) SetDoubleVal(v float64)
- func (a AttributeValue) SetIntVal(v int64)
- func (a AttributeValue) SetStringVal(v string)
- func (a AttributeValue) StringVal() string
- func (a AttributeValue) Type() AttributeValueType
- type AttributeValueType
- type DoubleDataPoint
- func (ms DoubleDataPoint) CopyTo(dest DoubleDataPoint)
- func (ms DoubleDataPoint) Exemplars() ExemplarSlice
- func (ms DoubleDataPoint) LabelsMap() StringMap
- func (ms DoubleDataPoint) SetStartTimestamp(v Timestamp)
- func (ms DoubleDataPoint) SetTimestamp(v Timestamp)
- func (ms DoubleDataPoint) SetValue(v float64)
- func (ms DoubleDataPoint) StartTimestamp() Timestamp
- func (ms DoubleDataPoint) Timestamp() Timestamp
- func (ms DoubleDataPoint) Value() float64
- type DoubleDataPointSlice
- func (es DoubleDataPointSlice) Append(e DoubleDataPoint)
- func (es DoubleDataPointSlice) AppendEmpty() DoubleDataPoint
- func (es DoubleDataPointSlice) At(ix int) DoubleDataPoint
- func (es DoubleDataPointSlice) CopyTo(dest DoubleDataPointSlice)
- func (es DoubleDataPointSlice) Len() int
- func (es DoubleDataPointSlice) MoveAndAppendTo(dest DoubleDataPointSlice)
- func (es DoubleDataPointSlice) RemoveIf(f func(DoubleDataPoint) bool)
- func (es DoubleDataPointSlice) Resize(newLen int)
- type DoubleGauge
- type DoubleSum
- func (ms DoubleSum) AggregationTemporality() AggregationTemporality
- func (ms DoubleSum) CopyTo(dest DoubleSum)
- func (ms DoubleSum) DataPoints() DoubleDataPointSlice
- func (ms DoubleSum) IsMonotonic() bool
- func (ms DoubleSum) SetAggregationTemporality(v AggregationTemporality)
- func (ms DoubleSum) SetIsMonotonic(v bool)
- type Exemplar
- type ExemplarSlice
- func (es ExemplarSlice) Append(e Exemplar)
- func (es ExemplarSlice) AppendEmpty() Exemplar
- func (es ExemplarSlice) At(ix int) Exemplar
- func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
- func (es ExemplarSlice) Len() int
- func (es ExemplarSlice) MoveAndAppendTo(dest ExemplarSlice)
- func (es ExemplarSlice) RemoveIf(f func(Exemplar) bool)
- func (es ExemplarSlice) Resize(newLen int)
- type Histogram
- type HistogramDataPoint
- 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) LabelsMap() StringMap
- func (ms HistogramDataPoint) SetBucketCounts(v []uint64)
- func (ms HistogramDataPoint) SetCount(v uint64)
- func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
- 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) Append(e HistogramDataPoint)
- func (es HistogramDataPointSlice) AppendEmpty() HistogramDataPoint
- func (es HistogramDataPointSlice) At(ix int) HistogramDataPoint
- func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) Len() int
- func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)
- func (es HistogramDataPointSlice) RemoveIf(f func(HistogramDataPoint) bool)
- func (es HistogramDataPointSlice) Resize(newLen int)
- type InstrumentationLibrary
- type InstrumentationLibraryLogs
- type InstrumentationLibraryLogsSlice
- func (es InstrumentationLibraryLogsSlice) Append(e InstrumentationLibraryLogs)
- func (es InstrumentationLibraryLogsSlice) AppendEmpty() InstrumentationLibraryLogs
- func (es InstrumentationLibraryLogsSlice) At(ix int) InstrumentationLibraryLogs
- func (es InstrumentationLibraryLogsSlice) CopyTo(dest InstrumentationLibraryLogsSlice)
- func (es InstrumentationLibraryLogsSlice) Len() int
- func (es InstrumentationLibraryLogsSlice) MoveAndAppendTo(dest InstrumentationLibraryLogsSlice)
- func (es InstrumentationLibraryLogsSlice) RemoveIf(f func(InstrumentationLibraryLogs) bool)
- func (es InstrumentationLibraryLogsSlice) Resize(newLen int)
- type InstrumentationLibraryMetrics
- type InstrumentationLibraryMetricsSlice
- func (es InstrumentationLibraryMetricsSlice) Append(e InstrumentationLibraryMetrics)
- func (es InstrumentationLibraryMetricsSlice) AppendEmpty() InstrumentationLibraryMetrics
- func (es InstrumentationLibraryMetricsSlice) At(ix int) InstrumentationLibraryMetrics
- func (es InstrumentationLibraryMetricsSlice) CopyTo(dest InstrumentationLibraryMetricsSlice)
- func (es InstrumentationLibraryMetricsSlice) Len() int
- func (es InstrumentationLibraryMetricsSlice) MoveAndAppendTo(dest InstrumentationLibraryMetricsSlice)
- func (es InstrumentationLibraryMetricsSlice) RemoveIf(f func(InstrumentationLibraryMetrics) bool)
- func (es InstrumentationLibraryMetricsSlice) Resize(newLen int)
- type InstrumentationLibrarySpans
- type InstrumentationLibrarySpansSlice
- func (es InstrumentationLibrarySpansSlice) Append(e InstrumentationLibrarySpans)
- func (es InstrumentationLibrarySpansSlice) AppendEmpty() InstrumentationLibrarySpans
- func (es InstrumentationLibrarySpansSlice) At(ix int) InstrumentationLibrarySpans
- func (es InstrumentationLibrarySpansSlice) CopyTo(dest InstrumentationLibrarySpansSlice)
- func (es InstrumentationLibrarySpansSlice) Len() int
- func (es InstrumentationLibrarySpansSlice) MoveAndAppendTo(dest InstrumentationLibrarySpansSlice)
- func (es InstrumentationLibrarySpansSlice) RemoveIf(f func(InstrumentationLibrarySpans) bool)
- func (es InstrumentationLibrarySpansSlice) Resize(newLen int)
- type IntDataPoint
- func (ms IntDataPoint) CopyTo(dest IntDataPoint)
- func (ms IntDataPoint) Exemplars() IntExemplarSlice
- func (ms IntDataPoint) LabelsMap() StringMap
- func (ms IntDataPoint) SetStartTimestamp(v Timestamp)
- func (ms IntDataPoint) SetTimestamp(v Timestamp)
- func (ms IntDataPoint) SetValue(v int64)
- func (ms IntDataPoint) StartTimestamp() Timestamp
- func (ms IntDataPoint) Timestamp() Timestamp
- func (ms IntDataPoint) Value() int64
- type IntDataPointSlice
- func (es IntDataPointSlice) Append(e IntDataPoint)
- func (es IntDataPointSlice) AppendEmpty() IntDataPoint
- func (es IntDataPointSlice) At(ix int) IntDataPoint
- func (es IntDataPointSlice) CopyTo(dest IntDataPointSlice)
- func (es IntDataPointSlice) Len() int
- func (es IntDataPointSlice) MoveAndAppendTo(dest IntDataPointSlice)
- func (es IntDataPointSlice) RemoveIf(f func(IntDataPoint) bool)
- func (es IntDataPointSlice) Resize(newLen int)
- type IntExemplar
- type IntExemplarSlice
- func (es IntExemplarSlice) Append(e IntExemplar)
- func (es IntExemplarSlice) AppendEmpty() IntExemplar
- func (es IntExemplarSlice) At(ix int) IntExemplar
- func (es IntExemplarSlice) CopyTo(dest IntExemplarSlice)
- func (es IntExemplarSlice) Len() int
- func (es IntExemplarSlice) MoveAndAppendTo(dest IntExemplarSlice)
- func (es IntExemplarSlice) RemoveIf(f func(IntExemplar) bool)
- func (es IntExemplarSlice) Resize(newLen int)
- type IntGauge
- type IntHistogram
- type IntHistogramDataPoint
- func (ms IntHistogramDataPoint) BucketCounts() []uint64
- func (ms IntHistogramDataPoint) CopyTo(dest IntHistogramDataPoint)
- func (ms IntHistogramDataPoint) Count() uint64
- func (ms IntHistogramDataPoint) Exemplars() IntExemplarSlice
- func (ms IntHistogramDataPoint) ExplicitBounds() []float64
- func (ms IntHistogramDataPoint) LabelsMap() StringMap
- func (ms IntHistogramDataPoint) SetBucketCounts(v []uint64)
- func (ms IntHistogramDataPoint) SetCount(v uint64)
- func (ms IntHistogramDataPoint) SetExplicitBounds(v []float64)
- func (ms IntHistogramDataPoint) SetStartTimestamp(v Timestamp)
- func (ms IntHistogramDataPoint) SetSum(v int64)
- func (ms IntHistogramDataPoint) SetTimestamp(v Timestamp)
- func (ms IntHistogramDataPoint) StartTimestamp() Timestamp
- func (ms IntHistogramDataPoint) Sum() int64
- func (ms IntHistogramDataPoint) Timestamp() Timestamp
- type IntHistogramDataPointSlice
- func (es IntHistogramDataPointSlice) Append(e IntHistogramDataPoint)
- func (es IntHistogramDataPointSlice) AppendEmpty() IntHistogramDataPoint
- func (es IntHistogramDataPointSlice) At(ix int) IntHistogramDataPoint
- func (es IntHistogramDataPointSlice) CopyTo(dest IntHistogramDataPointSlice)
- func (es IntHistogramDataPointSlice) Len() int
- func (es IntHistogramDataPointSlice) MoveAndAppendTo(dest IntHistogramDataPointSlice)
- func (es IntHistogramDataPointSlice) RemoveIf(f func(IntHistogramDataPoint) bool)
- func (es IntHistogramDataPointSlice) Resize(newLen int)
- type IntSum
- 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) 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) Append(e LogRecord)
- func (es LogSlice) AppendEmpty() LogRecord
- func (es LogSlice) At(ix int) LogRecord
- func (es LogSlice) CopyTo(dest LogSlice)
- func (es LogSlice) Len() int
- func (es LogSlice) MoveAndAppendTo(dest LogSlice)
- func (es LogSlice) RemoveIf(f func(LogRecord) bool)
- func (es LogSlice) Resize(newLen int)
- type Logs
- type Metric
- func (ms Metric) CopyTo(dest Metric)
- func (ms Metric) DataType() MetricDataType
- func (ms Metric) Description() string
- func (ms Metric) DoubleGauge() DoubleGauge
- func (ms Metric) DoubleSum() DoubleSum
- func (ms Metric) Histogram() Histogram
- func (ms Metric) IntGauge() IntGauge
- func (ms Metric) IntHistogram() IntHistogram
- func (ms Metric) IntSum() IntSum
- 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) Summary() Summary
- func (ms Metric) Unit() string
- type MetricDataType
- type MetricSlice
- func (es MetricSlice) Append(e Metric)
- func (es MetricSlice) AppendEmpty() Metric
- func (es MetricSlice) At(ix int) Metric
- func (es MetricSlice) CopyTo(dest MetricSlice)
- func (es MetricSlice) Len() int
- func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)
- func (es MetricSlice) RemoveIf(f func(Metric) bool)
- func (es MetricSlice) Resize(newLen int)
- type Metrics
- func (md Metrics) Clone() Metrics
- func (md Metrics) InternalRep() internal.MetricsWrapper
- func (md Metrics) MetricAndDataPointCount() (metricCount int, dataPointCount int)
- func (md Metrics) MetricCount() int
- func (md Metrics) OtlpProtoSize() int
- func (md Metrics) ResourceMetrics() ResourceMetricsSlice
- func (md Metrics) ToOtlpProtoBytes() ([]byte, error)
- type Resource
- type ResourceLogs
- type ResourceLogsSlice
- func (es ResourceLogsSlice) Append(e ResourceLogs)
- func (es ResourceLogsSlice) AppendEmpty() ResourceLogs
- func (es ResourceLogsSlice) At(ix int) ResourceLogs
- func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice)
- func (es ResourceLogsSlice) Len() int
- func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice)
- func (es ResourceLogsSlice) RemoveIf(f func(ResourceLogs) bool)
- func (es ResourceLogsSlice) Resize(newLen int)
- type ResourceMetrics
- type ResourceMetricsSlice
- func (es ResourceMetricsSlice) Append(e ResourceMetrics)
- func (es ResourceMetricsSlice) AppendEmpty() ResourceMetrics
- func (es ResourceMetricsSlice) At(ix int) ResourceMetrics
- func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) Len() int
- func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)
- func (es ResourceMetricsSlice) RemoveIf(f func(ResourceMetrics) bool)
- func (es ResourceMetricsSlice) Resize(newLen int)
- type ResourceSpans
- type ResourceSpansSlice
- func (es ResourceSpansSlice) Append(e ResourceSpans)
- func (es ResourceSpansSlice) AppendEmpty() ResourceSpans
- func (es ResourceSpansSlice) At(ix int) ResourceSpans
- func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice)
- func (es ResourceSpansSlice) Len() int
- func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice)
- func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool)
- func (es ResourceSpansSlice) Resize(newLen int)
- 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) 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) 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) Append(e SpanEvent)
- func (es SpanEventSlice) AppendEmpty() SpanEvent
- func (es SpanEventSlice) At(ix int) SpanEvent
- func (es SpanEventSlice) CopyTo(dest SpanEventSlice)
- func (es SpanEventSlice) Len() int
- func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice)
- func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool)
- func (es SpanEventSlice) Resize(newLen int)
- 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) 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) Append(e SpanLink)
- func (es SpanLinkSlice) AppendEmpty() SpanLink
- func (es SpanLinkSlice) At(ix int) SpanLink
- func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice)
- func (es SpanLinkSlice) Len() int
- func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice)
- func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool)
- func (es SpanLinkSlice) Resize(newLen int)
- type SpanSlice
- func (es SpanSlice) Append(e Span)
- func (es SpanSlice) AppendEmpty() Span
- func (es SpanSlice) At(ix int) Span
- func (es SpanSlice) CopyTo(dest SpanSlice)
- func (es SpanSlice) Len() int
- func (es SpanSlice) MoveAndAppendTo(dest SpanSlice)
- func (es SpanSlice) RemoveIf(f func(Span) bool)
- func (es SpanSlice) Resize(newLen int)
- type SpanStatus
- type StatusCode
- type StringMap
- func (sm StringMap) Clear()
- func (sm StringMap) CopyTo(dest StringMap)
- func (sm StringMap) Delete(k string) bool
- func (sm StringMap) EnsureCapacity(capacity int)
- func (sm StringMap) Get(k string) (string, bool)
- func (sm StringMap) InitFromMap(attrMap map[string]string) StringMap
- func (sm StringMap) Insert(k, v string)
- func (sm StringMap) Len() int
- func (sm StringMap) Range(f func(k string, v string) bool)
- func (sm StringMap) Sort() StringMap
- func (sm StringMap) Update(k, v string)
- func (sm StringMap) Upsert(k, v string)
- type Summary
- type SummaryDataPoint
- func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) Count() uint64
- func (ms SummaryDataPoint) LabelsMap() StringMap
- func (ms SummaryDataPoint) QuantileValues() ValueAtQuantileSlice
- func (ms SummaryDataPoint) SetCount(v uint64)
- 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) Append(e SummaryDataPoint)
- func (es SummaryDataPointSlice) AppendEmpty() SummaryDataPoint
- func (es SummaryDataPointSlice) At(ix int) SummaryDataPoint
- func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) Len() int
- func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)
- func (es SummaryDataPointSlice) RemoveIf(f func(SummaryDataPoint) bool)
- func (es SummaryDataPointSlice) Resize(newLen int)
- type Timestamp
- type TraceID
- type TraceState
- type Traces
- type ValueAtQuantile
- type ValueAtQuantileSlice
- func (es ValueAtQuantileSlice) Append(e ValueAtQuantile)
- func (es ValueAtQuantileSlice) AppendEmpty() ValueAtQuantile
- func (es ValueAtQuantileSlice) At(ix int) ValueAtQuantile
- func (es ValueAtQuantileSlice) CopyTo(dest ValueAtQuantileSlice)
- func (es ValueAtQuantileSlice) Len() int
- func (es ValueAtQuantileSlice) MoveAndAppendTo(dest ValueAtQuantileSlice)
- func (es ValueAtQuantileSlice) RemoveIf(f func(ValueAtQuantile) bool)
- func (es ValueAtQuantileSlice) Resize(newLen int)
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 ( // AggregationTemporalityUnspecified is the default AggregationTemporality, it MUST NOT be used. AggregationTemporalityUnspecified = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED) // AggregationTemporalityDelta is an AggregationTemporality for a metric aggregator which reports changes since last report time. AggregationTemporalityDelta = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA) // AggregationTemporalityCumulative is an AggregationTemporality for a metric aggregator which reports changes since a fixed start time. AggregationTemporalityCumulative = AggregationTemporality(otlpmetrics.AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE) )
const ( // SpanKindUnspecified represents that the SpanKind is unspecified, it MUST NOT be used. SpanKindUnspecified = SpanKind(0) // 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) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationTemporality ¶ added in v0.10.0
type AggregationTemporality int32
AggregationTemporality defines how a metric aggregator reports aggregated values. It describes how those values relate to the time interval over which they are aggregated.
func (AggregationTemporality) String ¶ added in v0.10.0
func (at AggregationTemporality) String() string
String returns the string representation of the AggregationTemporality.
type AnyValueArray ¶ added in v0.9.0
type AnyValueArray struct {
// contains filtered or unexported fields
}
AnyValueArray 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 NewAnyValueArray function to create new instances. Important: zero-initialized instance is not valid for use.
func NewAnyValueArray ¶ added in v0.9.0
func NewAnyValueArray() AnyValueArray
NewAnyValueArray creates a AnyValueArray with 0 elements. Can use "Resize" to initialize with a given length.
func (AnyValueArray) Append ¶ added in v0.9.0
func (es AnyValueArray) Append(e AttributeValue)
Append will increase the length of the AnyValueArray by one and set the given AttributeValue at that new position. The original AttributeValue could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (AnyValueArray) AppendEmpty ¶ added in v0.26.0
func (es AnyValueArray) AppendEmpty() AttributeValue
AppendEmpty will append to the end of the slice an empty AttributeValue. It returns the newly added AttributeValue.
func (AnyValueArray) At ¶ added in v0.9.0
func (es AnyValueArray) 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 (AnyValueArray) CopyTo ¶ added in v0.9.0
func (es AnyValueArray) CopyTo(dest AnyValueArray)
CopyTo copies all elements from the current slice to the dest.
func (AnyValueArray) Len ¶ added in v0.9.0
func (es AnyValueArray) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewAnyValueArray()".
func (AnyValueArray) MoveAndAppendTo ¶ added in v0.9.0
func (es AnyValueArray) MoveAndAppendTo(dest AnyValueArray)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (AnyValueArray) RemoveIf ¶ added in v0.26.0
func (es AnyValueArray) 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.
func (AnyValueArray) Resize ¶ added in v0.9.0
func (es AnyValueArray) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new AnyValueArray can be initialized: es := NewAnyValueArray() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type AttributeMap ¶
type AttributeMap struct {
// contains filtered or unexported fields
}
AttributeMap stores a map of attribute keys to values.
func NewAttributeMap ¶
func NewAttributeMap() AttributeMap
NewAttributeMap creates a AttributeMap with 0 elements.
func (AttributeMap) Clear ¶ added in v0.25.0
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 ¶ added in v0.25.0
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) InitFromMap ¶
func (am AttributeMap) InitFromMap(attrMap map[string]AttributeValue) AttributeMap
InitFromMap overwrites the entire AttributeMap and reconstructs the AttributeMap with values from the given map[string]string.
Returns the same instance to allow nicer code like: assert.EqualValues(t, NewAttributeMap().InitFromMap(map[string]AttributeValue{...}), actual)
func (AttributeMap) Insert ¶
func (am AttributeMap) Insert(k string, v AttributeValue)
Insert adds the AttributeValue to the map when the key does not exist. No action is applied to the map where the key already exists.
Calling this function with a zero-initialized AttributeValue struct will cause a panic.
Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.
func (AttributeMap) InsertBool ¶
func (am AttributeMap) InsertBool(k string, v bool)
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) 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 ¶ added in v0.5.0
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 ¶ added in v0.25.0
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:
it := sm.Range(func(k string, v AttributeValue) { ... })
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) 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 insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
Calling this function with a zero-initialized AttributeValue struct will cause a panic.
Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.
func (AttributeMap) UpsertBool ¶
func (am AttributeMap) UpsertBool(k string, v bool)
UpsertBool performs the Insert or Update action. The bool Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertDouble ¶
func (am AttributeMap) UpsertDouble(k string, v float64)
UpsertDouble performs the Insert or Update action. The double Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertInt ¶
func (am AttributeMap) UpsertInt(k string, v int64)
UpsertInt performs the Insert or Update action. The int Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertString ¶
func (am AttributeMap) UpsertString(k string, v string)
UpsertString performs the Insert or Update action. The AttributeValue is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
type AttributeValue ¶
type AttributeValue struct {
// contains filtered or unexported fields
}
AttributeValue represents a value of an attribute. Typically used in AttributeMap. Must use one of NewAttributeValue+ functions below to create new instances.
Intended to be passed by value since internally it is just a pointer to actual value representation. For the same reason passing by value and calling setters will modify the original, e.g.:
function f1(val AttributeValue) { val.SetIntVal(234) } function f2() { v := NewAttributeValueString("a string") f1(v) _ := v.Type() // this will return AttributeValueTypeInt }
Important: zero-initialized instance is not valid for use. All AttributeValue functions bellow must be called only on instances that are created via NewAttributeValue+ functions.
func NewAttributeValueArray ¶ added in v0.9.0
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 NewAttributeValueDouble ¶
func NewAttributeValueDouble(v float64) AttributeValue
NewAttributeValueDouble creates a new AttributeValue with the given float64 value.
func NewAttributeValueInt ¶
func NewAttributeValueInt(v int64) AttributeValue
NewAttributeValueInt creates a new AttributeValue with the given int64 value.
func NewAttributeValueMap ¶ added in v0.5.0
func NewAttributeValueMap() AttributeValue
NewAttributeValueMap creates a new AttributeValue of map type.
func NewAttributeValueNull ¶ added in v0.5.0
func NewAttributeValueNull() AttributeValue
NewAttributeValueNull creates a new AttributeValue with a null value.
func NewAttributeValueString ¶
func NewAttributeValueString(v string) AttributeValue
NewAttributeValueString creates a new AttributeValue with the given string value.
func (AttributeValue) ArrayVal ¶ added in v0.9.0
func (a AttributeValue) ArrayVal() AnyValueArray
ArrayVal returns the array value associated with this AttributeValue. If the Type() is not AttributeValueTypeArray then returns an empty array. Note that modifying such empty array has no effect on this AttributeValue.
Calling this function on zero-initialized AttributeValue will cause a panic.
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) 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 ¶ added in v0.5.0
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) 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) 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 AttributeValueType ¶
type AttributeValueType int32
AttributeValueType specifies the type of AttributeValue.
const ( AttributeValueTypeNull AttributeValueType = iota AttributeValueTypeString AttributeValueTypeInt AttributeValueTypeDouble AttributeValueTypeBool AttributeValueTypeMap AttributeValueTypeArray )
func (AttributeValueType) String ¶
func (avt AttributeValueType) String() string
type DoubleDataPoint ¶
type DoubleDataPoint struct {
// contains filtered or unexported fields
}
DoubleDataPoint is a single data point in a timeseries that describes the time-varying value of a double metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewDoubleDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleDataPoint ¶
func NewDoubleDataPoint() DoubleDataPoint
NewDoubleDataPoint creates a new empty DoubleDataPoint.
This must be used only in testing code since no "Set" method available.
func (DoubleDataPoint) CopyTo ¶
func (ms DoubleDataPoint) CopyTo(dest DoubleDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (DoubleDataPoint) Exemplars ¶ added in v0.10.0
func (ms DoubleDataPoint) Exemplars() ExemplarSlice
Exemplars returns the Exemplars associated with this DoubleDataPoint.
func (DoubleDataPoint) LabelsMap ¶
func (ms DoubleDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this DoubleDataPoint.
func (DoubleDataPoint) SetStartTimestamp ¶ added in v0.24.0
func (ms DoubleDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) SetTimestamp ¶
func (ms DoubleDataPoint) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) SetValue ¶
func (ms DoubleDataPoint) SetValue(v float64)
SetValue replaces the value associated with this DoubleDataPoint.
func (DoubleDataPoint) StartTimestamp ¶ added in v0.24.0
func (ms DoubleDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) Timestamp ¶
func (ms DoubleDataPoint) Timestamp() Timestamp
Timestamp returns the timestamp associated with this DoubleDataPoint.
func (DoubleDataPoint) Value ¶
func (ms DoubleDataPoint) Value() float64
Value returns the value associated with this DoubleDataPoint.
type DoubleDataPointSlice ¶
type DoubleDataPointSlice struct {
// contains filtered or unexported fields
}
DoubleDataPointSlice logically represents a slice of DoubleDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewDoubleDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleDataPointSlice ¶
func NewDoubleDataPointSlice() DoubleDataPointSlice
NewDoubleDataPointSlice creates a DoubleDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (DoubleDataPointSlice) Append ¶ added in v0.5.0
func (es DoubleDataPointSlice) Append(e DoubleDataPoint)
Append will increase the length of the DoubleDataPointSlice by one and set the given DoubleDataPoint at that new position. The original DoubleDataPoint could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (DoubleDataPointSlice) AppendEmpty ¶ added in v0.26.0
func (es DoubleDataPointSlice) AppendEmpty() DoubleDataPoint
AppendEmpty will append to the end of the slice an empty DoubleDataPoint. It returns the newly added DoubleDataPoint.
func (DoubleDataPointSlice) At ¶
func (es DoubleDataPointSlice) At(ix int) DoubleDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (DoubleDataPointSlice) CopyTo ¶
func (es DoubleDataPointSlice) CopyTo(dest DoubleDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (DoubleDataPointSlice) Len ¶
func (es DoubleDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewDoubleDataPointSlice()".
func (DoubleDataPointSlice) MoveAndAppendTo ¶
func (es DoubleDataPointSlice) MoveAndAppendTo(dest DoubleDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (DoubleDataPointSlice) RemoveIf ¶ added in v0.26.0
func (es DoubleDataPointSlice) RemoveIf(f func(DoubleDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (DoubleDataPointSlice) Resize ¶
func (es DoubleDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new DoubleDataPointSlice can be initialized: es := NewDoubleDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type DoubleGauge ¶ added in v0.10.0
type DoubleGauge struct {
// contains filtered or unexported fields
}
DoubleGauge 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 NewDoubleGauge function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleGauge ¶ added in v0.10.0
func NewDoubleGauge() DoubleGauge
NewDoubleGauge creates a new empty DoubleGauge.
This must be used only in testing code since no "Set" method available.
func (DoubleGauge) CopyTo ¶ added in v0.10.0
func (ms DoubleGauge) CopyTo(dest DoubleGauge)
CopyTo copies all properties from the current struct to the dest.
func (DoubleGauge) DataPoints ¶ added in v0.10.0
func (ms DoubleGauge) DataPoints() DoubleDataPointSlice
DataPoints returns the DataPoints associated with this DoubleGauge.
type DoubleSum ¶ added in v0.10.0
type DoubleSum struct {
// contains filtered or unexported fields
}
DoubleSum 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 NewDoubleSum function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleSum ¶ added in v0.10.0
func NewDoubleSum() DoubleSum
NewDoubleSum creates a new empty DoubleSum.
This must be used only in testing code since no "Set" method available.
func (DoubleSum) AggregationTemporality ¶ added in v0.10.0
func (ms DoubleSum) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this DoubleSum.
func (DoubleSum) CopyTo ¶ added in v0.10.0
CopyTo copies all properties from the current struct to the dest.
func (DoubleSum) DataPoints ¶ added in v0.10.0
func (ms DoubleSum) DataPoints() DoubleDataPointSlice
DataPoints returns the DataPoints associated with this DoubleSum.
func (DoubleSum) IsMonotonic ¶ added in v0.10.0
IsMonotonic returns the ismonotonic associated with this DoubleSum.
func (DoubleSum) SetAggregationTemporality ¶ added in v0.10.0
func (ms DoubleSum) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this DoubleSum.
func (DoubleSum) SetIsMonotonic ¶ added in v0.10.0
SetIsMonotonic replaces the ismonotonic associated with this DoubleSum.
type Exemplar ¶ added in v0.24.0
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 ¶ added in v0.24.0
func NewExemplar() Exemplar
NewExemplar creates a new empty Exemplar.
This must be used only in testing code since no "Set" method available.
func (Exemplar) CopyTo ¶ added in v0.24.0
CopyTo copies all properties from the current struct to the dest.
func (Exemplar) FilteredLabels ¶ added in v0.24.0
FilteredLabels returns the FilteredLabels associated with this Exemplar.
func (Exemplar) SetTimestamp ¶ added in v0.24.0
SetTimestamp replaces the timestamp associated with this Exemplar.
func (Exemplar) SetValue ¶ added in v0.24.0
SetValue replaces the value associated with this Exemplar.
type ExemplarSlice ¶ added in v0.24.0
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 ¶ added in v0.24.0
func NewExemplarSlice() ExemplarSlice
NewExemplarSlice creates a ExemplarSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (ExemplarSlice) Append ¶ added in v0.24.0
func (es ExemplarSlice) Append(e Exemplar)
Append will increase the length of the ExemplarSlice by one and set the given Exemplar at that new position. The original Exemplar could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (ExemplarSlice) AppendEmpty ¶ added in v0.26.0
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 ¶ added in v0.24.0
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 ¶ added in v0.24.0
func (es ExemplarSlice) CopyTo(dest ExemplarSlice)
CopyTo copies all elements from the current slice to the dest.
func (ExemplarSlice) Len ¶ added in v0.24.0
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 ¶ added in v0.24.0
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 ¶ added in v0.26.0
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.
func (ExemplarSlice) Resize ¶ added in v0.24.0
func (es ExemplarSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new ExemplarSlice can be initialized: es := NewExemplarSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Histogram ¶ added in v0.24.0
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 ¶ added in v0.24.0
func NewHistogram() Histogram
NewHistogram creates a new empty Histogram.
This must be used only in testing code since no "Set" method available.
func (Histogram) AggregationTemporality ¶ added in v0.24.0
func (ms Histogram) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this Histogram.
func (Histogram) CopyTo ¶ added in v0.24.0
CopyTo copies all properties from the current struct to the dest.
func (Histogram) DataPoints ¶ added in v0.24.0
func (ms Histogram) DataPoints() HistogramDataPointSlice
DataPoints returns the DataPoints associated with this Histogram.
func (Histogram) SetAggregationTemporality ¶ added in v0.24.0
func (ms Histogram) SetAggregationTemporality(v AggregationTemporality)
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 since no "Set" method available.
func (HistogramDataPoint) BucketCounts ¶ added in v0.24.0
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 ¶ added in v0.24.0
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) LabelsMap ¶
func (ms HistogramDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this HistogramDataPoint.
func (HistogramDataPoint) SetBucketCounts ¶ added in v0.24.0
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) SetStartTimestamp ¶ added in v0.24.0
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 ¶ added in v0.24.0
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 "Resize" to initialize with a given length.
func (HistogramDataPointSlice) Append ¶ added in v0.5.0
func (es HistogramDataPointSlice) Append(e HistogramDataPoint)
Append will increase the length of the HistogramDataPointSlice by one and set the given HistogramDataPoint at that new position. The original HistogramDataPoint could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (HistogramDataPointSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es HistogramDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new HistogramDataPointSlice can be initialized: es := NewHistogramDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type InstrumentationLibrary ¶
type InstrumentationLibrary struct {
// contains filtered or unexported fields
}
InstrumentationLibrary is a message representing the instrumentation library information.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibrary function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrary ¶
func NewInstrumentationLibrary() InstrumentationLibrary
NewInstrumentationLibrary creates a new empty InstrumentationLibrary.
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibrary) CopyTo ¶
func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrary) 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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func NewInstrumentationLibraryLogs() InstrumentationLibraryLogs
NewInstrumentationLibraryLogs creates a new empty InstrumentationLibraryLogs.
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibraryLogs) CopyTo ¶ added in v0.7.0
func (ms InstrumentationLibraryLogs) CopyTo(dest InstrumentationLibraryLogs)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibraryLogs) InstrumentationLibrary ¶ added in v0.7.0
func (ms InstrumentationLibraryLogs) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryLogs.
func (InstrumentationLibraryLogs) Logs ¶ added in v0.7.0
func (ms InstrumentationLibraryLogs) Logs() LogSlice
Logs returns the Logs associated with this InstrumentationLibraryLogs.
type InstrumentationLibraryLogsSlice ¶ added in v0.7.0
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 ¶ added in v0.7.0
func NewInstrumentationLibraryLogsSlice() InstrumentationLibraryLogsSlice
NewInstrumentationLibraryLogsSlice creates a InstrumentationLibraryLogsSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (InstrumentationLibraryLogsSlice) Append ¶ added in v0.7.0
func (es InstrumentationLibraryLogsSlice) Append(e InstrumentationLibraryLogs)
Append will increase the length of the InstrumentationLibraryLogsSlice by one and set the given InstrumentationLibraryLogs at that new position. The original InstrumentationLibraryLogs could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (InstrumentationLibraryLogsSlice) AppendEmpty ¶ added in v0.26.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (es InstrumentationLibraryLogsSlice) CopyTo(dest InstrumentationLibraryLogsSlice)
CopyTo copies all elements from the current slice to the dest.
func (InstrumentationLibraryLogsSlice) Len ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.26.0
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) Resize ¶ added in v0.7.0
func (es InstrumentationLibraryLogsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new InstrumentationLibraryLogsSlice can be initialized: es := NewInstrumentationLibraryLogsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
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 since no "Set" method available.
func (InstrumentationLibraryMetrics) CopyTo ¶
func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibraryMetrics) 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.
type InstrumentationLibraryMetricsSlice ¶
type InstrumentationLibraryMetricsSlice struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetricsSlice logically represents a slice of InstrumentationLibraryMetrics.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibraryMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibraryMetricsSlice ¶
func NewInstrumentationLibraryMetricsSlice() InstrumentationLibraryMetricsSlice
NewInstrumentationLibraryMetricsSlice creates a InstrumentationLibraryMetricsSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (InstrumentationLibraryMetricsSlice) Append ¶ added in v0.5.0
func (es InstrumentationLibraryMetricsSlice) Append(e InstrumentationLibraryMetrics)
Append will increase the length of the InstrumentationLibraryMetricsSlice by one and set the given InstrumentationLibraryMetrics at that new position. The original InstrumentationLibraryMetrics could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (InstrumentationLibraryMetricsSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es InstrumentationLibraryMetricsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new InstrumentationLibraryMetricsSlice can be initialized: es := NewInstrumentationLibraryMetricsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type InstrumentationLibrarySpans ¶
type InstrumentationLibrarySpans struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibrarySpans function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrarySpans ¶
func NewInstrumentationLibrarySpans() InstrumentationLibrarySpans
NewInstrumentationLibrarySpans creates a new empty InstrumentationLibrarySpans.
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibrarySpans) CopyTo ¶
func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrarySpans) InstrumentationLibrary ¶
func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary 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 "Resize" to initialize with a given length.
func (InstrumentationLibrarySpansSlice) Append ¶ added in v0.5.0
func (es InstrumentationLibrarySpansSlice) Append(e InstrumentationLibrarySpans)
Append will increase the length of the InstrumentationLibrarySpansSlice by one and set the given InstrumentationLibrarySpans at that new position. The original InstrumentationLibrarySpans could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (InstrumentationLibrarySpansSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es InstrumentationLibrarySpansSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new InstrumentationLibrarySpansSlice can be initialized: es := NewInstrumentationLibrarySpansSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type IntDataPoint ¶ added in v0.10.0
type IntDataPoint struct {
// contains filtered or unexported fields
}
IntDataPoint is a single data point in a timeseries that describes the time-varying values of a scalar int metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewIntDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntDataPoint ¶ added in v0.10.0
func NewIntDataPoint() IntDataPoint
NewIntDataPoint creates a new empty IntDataPoint.
This must be used only in testing code since no "Set" method available.
func (IntDataPoint) CopyTo ¶ added in v0.10.0
func (ms IntDataPoint) CopyTo(dest IntDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (IntDataPoint) Exemplars ¶ added in v0.10.0
func (ms IntDataPoint) Exemplars() IntExemplarSlice
Exemplars returns the Exemplars associated with this IntDataPoint.
func (IntDataPoint) LabelsMap ¶ added in v0.10.0
func (ms IntDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this IntDataPoint.
func (IntDataPoint) SetStartTimestamp ¶ added in v0.24.0
func (ms IntDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this IntDataPoint.
func (IntDataPoint) SetTimestamp ¶ added in v0.10.0
func (ms IntDataPoint) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this IntDataPoint.
func (IntDataPoint) SetValue ¶ added in v0.10.0
func (ms IntDataPoint) SetValue(v int64)
SetValue replaces the value associated with this IntDataPoint.
func (IntDataPoint) StartTimestamp ¶ added in v0.24.0
func (ms IntDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp associated with this IntDataPoint.
func (IntDataPoint) Timestamp ¶ added in v0.10.0
func (ms IntDataPoint) Timestamp() Timestamp
Timestamp returns the timestamp associated with this IntDataPoint.
func (IntDataPoint) Value ¶ added in v0.10.0
func (ms IntDataPoint) Value() int64
Value returns the value associated with this IntDataPoint.
type IntDataPointSlice ¶ added in v0.10.0
type IntDataPointSlice struct {
// contains filtered or unexported fields
}
IntDataPointSlice logically represents a slice of IntDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewIntDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntDataPointSlice ¶ added in v0.10.0
func NewIntDataPointSlice() IntDataPointSlice
NewIntDataPointSlice creates a IntDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (IntDataPointSlice) Append ¶ added in v0.10.0
func (es IntDataPointSlice) Append(e IntDataPoint)
Append will increase the length of the IntDataPointSlice by one and set the given IntDataPoint at that new position. The original IntDataPoint could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (IntDataPointSlice) AppendEmpty ¶ added in v0.26.0
func (es IntDataPointSlice) AppendEmpty() IntDataPoint
AppendEmpty will append to the end of the slice an empty IntDataPoint. It returns the newly added IntDataPoint.
func (IntDataPointSlice) At ¶ added in v0.10.0
func (es IntDataPointSlice) At(ix int) IntDataPoint
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 (IntDataPointSlice) CopyTo ¶ added in v0.10.0
func (es IntDataPointSlice) CopyTo(dest IntDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (IntDataPointSlice) Len ¶ added in v0.10.0
func (es IntDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewIntDataPointSlice()".
func (IntDataPointSlice) MoveAndAppendTo ¶ added in v0.10.0
func (es IntDataPointSlice) MoveAndAppendTo(dest IntDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (IntDataPointSlice) RemoveIf ¶ added in v0.26.0
func (es IntDataPointSlice) RemoveIf(f func(IntDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (IntDataPointSlice) Resize ¶ added in v0.10.0
func (es IntDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new IntDataPointSlice can be initialized: es := NewIntDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type IntExemplar ¶ added in v0.10.0
type IntExemplar struct {
// contains filtered or unexported fields
}
IntExemplar is a sample input int 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 NewIntExemplar function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntExemplar ¶ added in v0.10.0
func NewIntExemplar() IntExemplar
NewIntExemplar creates a new empty IntExemplar.
This must be used only in testing code since no "Set" method available.
func (IntExemplar) CopyTo ¶ added in v0.10.0
func (ms IntExemplar) CopyTo(dest IntExemplar)
CopyTo copies all properties from the current struct to the dest.
func (IntExemplar) FilteredLabels ¶ added in v0.10.0
func (ms IntExemplar) FilteredLabels() StringMap
FilteredLabels returns the FilteredLabels associated with this IntExemplar.
func (IntExemplar) SetTimestamp ¶ added in v0.10.0
func (ms IntExemplar) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this IntExemplar.
func (IntExemplar) SetValue ¶ added in v0.10.0
func (ms IntExemplar) SetValue(v int64)
SetValue replaces the value associated with this IntExemplar.
func (IntExemplar) Timestamp ¶ added in v0.10.0
func (ms IntExemplar) Timestamp() Timestamp
Timestamp returns the timestamp associated with this IntExemplar.
func (IntExemplar) Value ¶ added in v0.10.0
func (ms IntExemplar) Value() int64
Value returns the value associated with this IntExemplar.
type IntExemplarSlice ¶ added in v0.10.0
type IntExemplarSlice struct {
// contains filtered or unexported fields
}
IntExemplarSlice logically represents a slice of IntExemplar.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewIntExemplarSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntExemplarSlice ¶ added in v0.10.0
func NewIntExemplarSlice() IntExemplarSlice
NewIntExemplarSlice creates a IntExemplarSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (IntExemplarSlice) Append ¶ added in v0.10.0
func (es IntExemplarSlice) Append(e IntExemplar)
Append will increase the length of the IntExemplarSlice by one and set the given IntExemplar at that new position. The original IntExemplar could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (IntExemplarSlice) AppendEmpty ¶ added in v0.26.0
func (es IntExemplarSlice) AppendEmpty() IntExemplar
AppendEmpty will append to the end of the slice an empty IntExemplar. It returns the newly added IntExemplar.
func (IntExemplarSlice) At ¶ added in v0.10.0
func (es IntExemplarSlice) At(ix int) IntExemplar
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 (IntExemplarSlice) CopyTo ¶ added in v0.10.0
func (es IntExemplarSlice) CopyTo(dest IntExemplarSlice)
CopyTo copies all elements from the current slice to the dest.
func (IntExemplarSlice) Len ¶ added in v0.10.0
func (es IntExemplarSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewIntExemplarSlice()".
func (IntExemplarSlice) MoveAndAppendTo ¶ added in v0.10.0
func (es IntExemplarSlice) MoveAndAppendTo(dest IntExemplarSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (IntExemplarSlice) RemoveIf ¶ added in v0.26.0
func (es IntExemplarSlice) RemoveIf(f func(IntExemplar) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (IntExemplarSlice) Resize ¶ added in v0.10.0
func (es IntExemplarSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new IntExemplarSlice can be initialized: es := NewIntExemplarSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type IntGauge ¶ added in v0.10.0
type IntGauge struct {
// contains filtered or unexported fields
}
IntGauge represents the type of a int 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 NewIntGauge function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntGauge ¶ added in v0.10.0
func NewIntGauge() IntGauge
NewIntGauge creates a new empty IntGauge.
This must be used only in testing code since no "Set" method available.
func (IntGauge) CopyTo ¶ added in v0.10.0
CopyTo copies all properties from the current struct to the dest.
func (IntGauge) DataPoints ¶ added in v0.10.0
func (ms IntGauge) DataPoints() IntDataPointSlice
DataPoints returns the DataPoints associated with this IntGauge.
type IntHistogram ¶ added in v0.10.0
type IntHistogram struct {
// contains filtered or unexported fields
}
IntHistogram represents the type of a metric that is calculated by aggregating as a Histogram 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 NewIntHistogram function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntHistogram ¶ added in v0.10.0
func NewIntHistogram() IntHistogram
NewIntHistogram creates a new empty IntHistogram.
This must be used only in testing code since no "Set" method available.
func (IntHistogram) AggregationTemporality ¶ added in v0.10.0
func (ms IntHistogram) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this IntHistogram.
func (IntHistogram) CopyTo ¶ added in v0.10.0
func (ms IntHistogram) CopyTo(dest IntHistogram)
CopyTo copies all properties from the current struct to the dest.
func (IntHistogram) DataPoints ¶ added in v0.10.0
func (ms IntHistogram) DataPoints() IntHistogramDataPointSlice
DataPoints returns the DataPoints associated with this IntHistogram.
func (IntHistogram) SetAggregationTemporality ¶ added in v0.10.0
func (ms IntHistogram) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this IntHistogram.
type IntHistogramDataPoint ¶ added in v0.10.0
type IntHistogramDataPoint struct {
// contains filtered or unexported fields
}
IntHistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram of int values.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewIntHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntHistogramDataPoint ¶ added in v0.10.0
func NewIntHistogramDataPoint() IntHistogramDataPoint
NewIntHistogramDataPoint creates a new empty IntHistogramDataPoint.
This must be used only in testing code since no "Set" method available.
func (IntHistogramDataPoint) BucketCounts ¶ added in v0.10.0
func (ms IntHistogramDataPoint) BucketCounts() []uint64
BucketCounts returns the bucketcounts associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) CopyTo ¶ added in v0.10.0
func (ms IntHistogramDataPoint) CopyTo(dest IntHistogramDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (IntHistogramDataPoint) Count ¶ added in v0.10.0
func (ms IntHistogramDataPoint) Count() uint64
Count returns the count associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) Exemplars ¶ added in v0.10.0
func (ms IntHistogramDataPoint) Exemplars() IntExemplarSlice
Exemplars returns the Exemplars associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) ExplicitBounds ¶ added in v0.10.0
func (ms IntHistogramDataPoint) ExplicitBounds() []float64
ExplicitBounds returns the explicitbounds associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) LabelsMap ¶ added in v0.10.0
func (ms IntHistogramDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetBucketCounts ¶ added in v0.10.0
func (ms IntHistogramDataPoint) SetBucketCounts(v []uint64)
SetBucketCounts replaces the bucketcounts associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetCount ¶ added in v0.10.0
func (ms IntHistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetExplicitBounds ¶ added in v0.10.0
func (ms IntHistogramDataPoint) SetExplicitBounds(v []float64)
SetExplicitBounds replaces the explicitbounds associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetStartTimestamp ¶ added in v0.24.0
func (ms IntHistogramDataPoint) SetStartTimestamp(v Timestamp)
SetStartTimestamp replaces the starttimestamp associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetSum ¶ added in v0.10.0
func (ms IntHistogramDataPoint) SetSum(v int64)
SetSum replaces the sum associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) SetTimestamp ¶ added in v0.10.0
func (ms IntHistogramDataPoint) SetTimestamp(v Timestamp)
SetTimestamp replaces the timestamp associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) StartTimestamp ¶ added in v0.24.0
func (ms IntHistogramDataPoint) StartTimestamp() Timestamp
StartTimestamp returns the starttimestamp associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) Sum ¶ added in v0.10.0
func (ms IntHistogramDataPoint) Sum() int64
Sum returns the sum associated with this IntHistogramDataPoint.
func (IntHistogramDataPoint) Timestamp ¶ added in v0.10.0
func (ms IntHistogramDataPoint) Timestamp() Timestamp
Timestamp returns the timestamp associated with this IntHistogramDataPoint.
type IntHistogramDataPointSlice ¶ added in v0.10.0
type IntHistogramDataPointSlice struct {
// contains filtered or unexported fields
}
IntHistogramDataPointSlice logically represents a slice of IntHistogramDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewIntHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntHistogramDataPointSlice ¶ added in v0.10.0
func NewIntHistogramDataPointSlice() IntHistogramDataPointSlice
NewIntHistogramDataPointSlice creates a IntHistogramDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (IntHistogramDataPointSlice) Append ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) Append(e IntHistogramDataPoint)
Append will increase the length of the IntHistogramDataPointSlice by one and set the given IntHistogramDataPoint at that new position. The original IntHistogramDataPoint could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (IntHistogramDataPointSlice) AppendEmpty ¶ added in v0.26.0
func (es IntHistogramDataPointSlice) AppendEmpty() IntHistogramDataPoint
AppendEmpty will append to the end of the slice an empty IntHistogramDataPoint. It returns the newly added IntHistogramDataPoint.
func (IntHistogramDataPointSlice) At ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) At(ix int) IntHistogramDataPoint
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 (IntHistogramDataPointSlice) CopyTo ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) CopyTo(dest IntHistogramDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (IntHistogramDataPointSlice) Len ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewIntHistogramDataPointSlice()".
func (IntHistogramDataPointSlice) MoveAndAppendTo ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) MoveAndAppendTo(dest IntHistogramDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (IntHistogramDataPointSlice) RemoveIf ¶ added in v0.26.0
func (es IntHistogramDataPointSlice) RemoveIf(f func(IntHistogramDataPoint) bool)
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (IntHistogramDataPointSlice) Resize ¶ added in v0.10.0
func (es IntHistogramDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new IntHistogramDataPointSlice can be initialized: es := NewIntHistogramDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type IntSum ¶ added in v0.10.0
type IntSum struct {
// contains filtered or unexported fields
}
IntSum represents the type of a numeric int 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 NewIntSum function to create new instances. Important: zero-initialized instance is not valid for use.
func NewIntSum ¶ added in v0.10.0
func NewIntSum() IntSum
NewIntSum creates a new empty IntSum.
This must be used only in testing code since no "Set" method available.
func (IntSum) AggregationTemporality ¶ added in v0.10.0
func (ms IntSum) AggregationTemporality() AggregationTemporality
AggregationTemporality returns the aggregationtemporality associated with this IntSum.
func (IntSum) CopyTo ¶ added in v0.10.0
CopyTo copies all properties from the current struct to the dest.
func (IntSum) DataPoints ¶ added in v0.10.0
func (ms IntSum) DataPoints() IntDataPointSlice
DataPoints returns the DataPoints associated with this IntSum.
func (IntSum) IsMonotonic ¶ added in v0.10.0
IsMonotonic returns the ismonotonic associated with this IntSum.
func (IntSum) SetAggregationTemporality ¶ added in v0.10.0
func (ms IntSum) SetAggregationTemporality(v AggregationTemporality)
SetAggregationTemporality replaces the aggregationtemporality associated with this IntSum.
func (IntSum) SetIsMonotonic ¶ added in v0.10.0
SetIsMonotonic replaces the ismonotonic associated with this IntSum.
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 since no "Set" method available.
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) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord.
func (LogRecord) SetName ¶ added in v0.7.0
SetName replaces the name 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 "Resize" to initialize with a given length.
func (LogSlice) Append ¶ added in v0.5.0
Append will increase the length of the LogSlice by one and set the given LogRecord at that new position. The original LogRecord could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (LogSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (LogSlice) Resize ¶
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new LogSlice can be initialized: es := NewLogSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Logs ¶ added in v0.8.0
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 ¶ added in v0.11.0
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 LogsFromOtlpProtoBytes ¶ added in v0.23.0
LogsFromOtlpProtoBytes converts OTLP Collector ExportLogsServiceRequest ProtoBuf bytes to the internal Logs.
Returns an invalid Logs instance if error is not nil.
func (Logs) InternalRep ¶ added in v0.11.0
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 ¶ added in v0.8.0
LogRecordCount calculates the total number of log records.
func (Logs) OtlpProtoSize ¶ added in v0.23.0
OtlpProtoSize returns the size in bytes of this Logs encoded as OTLP Collector ExportLogsServiceRequest ProtoBuf bytes.
func (Logs) ResourceLogs ¶ added in v0.8.0
func (ld Logs) ResourceLogs() ResourceLogsSlice
ResourceLogs returns the ResourceLogsSlice associated with this Logs.
func (Logs) ToOtlpProtoBytes ¶ added in v0.11.0
ToOtlpProtoBytes converts this Logs to the OTLP Collector ExportLogsServiceRequest ProtoBuf bytes.
Returns an nil byte-array if error is not nil.
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 since no "Set" method available.
func (Metric) DataType ¶ added in v0.10.0
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 ¶ added in v0.10.0
Description returns the description associated with this Metric.
func (Metric) DoubleGauge ¶ added in v0.10.0
func (ms Metric) DoubleGauge() DoubleGauge
DoubleGauge returns the data as DoubleGauge. Calling this function when DataType() != MetricDataTypeDoubleGauge will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) DoubleSum ¶ added in v0.10.0
DoubleSum returns the data as DoubleSum. Calling this function when DataType() != MetricDataTypeDoubleSum will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) Histogram ¶ added in v0.24.0
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) IntGauge ¶ added in v0.10.0
IntGauge returns the data as IntGauge. Calling this function when DataType() != MetricDataTypeIntGauge will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) IntHistogram ¶ added in v0.10.0
func (ms Metric) IntHistogram() IntHistogram
IntHistogram returns the data as IntHistogram. Calling this function when DataType() != MetricDataTypeIntHistogram will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) IntSum ¶ added in v0.10.0
IntSum returns the data as IntSum. Calling this function when DataType() != MetricDataTypeIntSum will cause a panic. Calling this function on zero-initialized Metric will cause a panic.
func (Metric) SetDataType ¶ added in v0.10.0
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 ¶ added in v0.10.0
SetDescription replaces the description associated with this Metric.
type MetricDataType ¶ added in v0.10.0
type MetricDataType int32
MetricDataType specifies the type of data in a Metric.
const ( MetricDataTypeNone MetricDataType = iota MetricDataTypeIntGauge MetricDataTypeDoubleGauge MetricDataTypeIntSum MetricDataTypeDoubleSum MetricDataTypeIntHistogram MetricDataTypeHistogram MetricDataTypeSummary )
func (MetricDataType) String ¶ added in v0.10.0
func (mdt MetricDataType) String() string
type MetricSlice ¶
type MetricSlice struct {
// contains filtered or unexported fields
}
MetricSlice logically represents a slice of Metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewMetricSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetricSlice ¶
func NewMetricSlice() MetricSlice
NewMetricSlice creates a MetricSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (MetricSlice) Append ¶ added in v0.5.0
func (es MetricSlice) Append(e Metric)
Append will increase the length of the MetricSlice by one and set the given Metric at that new position. The original Metric could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (MetricSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es MetricSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new MetricSlice can be initialized: es := NewMetricSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type 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 facilitate the transition to the new components especially for traces.
Outside of the core repository the metrics pipeline cannot be converted to the new model since data.MetricData is part of the internal package.
func MetricsFromInternalRep ¶ added in v0.23.0
func MetricsFromInternalRep(wrapper internal.MetricsWrapper) Metrics
MetricsFromInternalRep creates Metrics from the internal representation. Should not be used outside this module.
func MetricsFromOtlpProtoBytes ¶ added in v0.23.0
MetricsFromOtlpProtoBytes converts the OTLP Collector ExportMetricsServiceRequest ProtoBuf bytes to Metrics.
Returns an invalid Metrics instance if error is not nil.
func (Metrics) InternalRep ¶ added in v0.23.0
func (md Metrics) InternalRep() internal.MetricsWrapper
InternalRep returns internal representation of the Metrics. Should not be used outside this module.
func (Metrics) MetricAndDataPointCount ¶ added in v0.10.0
MetricAndDataPointCount calculates the total number of metrics and data points.
func (Metrics) MetricCount ¶ added in v0.10.0
MetricCount calculates the total number of metrics.
func (Metrics) OtlpProtoSize ¶ added in v0.23.0
OtlpProtoSize returns the size in bytes of this Metrics encoded as OTLP Collector ExportMetricsServiceRequest ProtoBuf bytes.
func (Metrics) ResourceMetrics ¶ added in v0.10.0
func (md Metrics) ResourceMetrics() ResourceMetricsSlice
ResourceMetrics returns the ResourceMetricsSlice associated with this Metrics.
func (Metrics) ToOtlpProtoBytes ¶ added in v0.11.0
ToOtlpProtoBytes converts this Metrics to the OTLP Collector ExportMetricsServiceRequest ProtoBuf bytes.
Returns an nil byte-array if error is not nil.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource information.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResource function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResource ¶
func NewResource() Resource
NewResource creates a new empty Resource.
This must be used only in testing code since no "Set" method available.
func (Resource) Attributes ¶
func (ms Resource) Attributes() AttributeMap
Attributes returns the Attributes associated with this Resource.
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 since no "Set" method available.
func (ResourceLogs) CopyTo ¶
func (ms ResourceLogs) CopyTo(dest ResourceLogs)
CopyTo copies all properties from the current struct to the dest.
func (ResourceLogs) InstrumentationLibraryLogs ¶ added in v0.7.0
func (ms ResourceLogs) InstrumentationLibraryLogs() InstrumentationLibraryLogsSlice
InstrumentationLibraryLogs returns the InstrumentationLibraryLogs associated with this ResourceLogs.
func (ResourceLogs) Resource ¶
func (ms ResourceLogs) Resource() Resource
Resource returns the resource 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 "Resize" to initialize with a given length.
func (ResourceLogsSlice) Append ¶ added in v0.5.0
func (es ResourceLogsSlice) Append(e ResourceLogs)
Append will increase the length of the ResourceLogsSlice by one and set the given ResourceLogs at that new position. The original ResourceLogs could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (ResourceLogsSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es ResourceLogsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new ResourceLogsSlice can be initialized: es := NewResourceLogsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetrics is a collection of metrics from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceMetrics function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceMetrics ¶
func NewResourceMetrics() ResourceMetrics
NewResourceMetrics creates a new empty ResourceMetrics.
This must be used only in testing code since no "Set" method available.
func (ResourceMetrics) CopyTo ¶
func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
CopyTo copies all properties from the current struct to the dest.
func (ResourceMetrics) InstrumentationLibraryMetrics ¶
func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice
InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics.
func (ResourceMetrics) Resource ¶
func (ms ResourceMetrics) Resource() Resource
Resource returns the resource associated with this ResourceMetrics.
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 "Resize" to initialize with a given length.
func (ResourceMetricsSlice) Append ¶ added in v0.5.0
func (es ResourceMetricsSlice) Append(e ResourceMetrics)
Append will increase the length of the ResourceMetricsSlice by one and set the given ResourceMetrics at that new position. The original ResourceMetrics could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (ResourceMetricsSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es ResourceMetricsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new ResourceMetricsSlice can be initialized: es := NewResourceMetricsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type ResourceSpans ¶
type ResourceSpans struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceSpans function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceSpans ¶
func NewResourceSpans() ResourceSpans
NewResourceSpans creates a new empty ResourceSpans.
This must be used only in testing code since no "Set" method available.
func (ResourceSpans) CopyTo ¶
func (ms ResourceSpans) CopyTo(dest ResourceSpans)
CopyTo copies all properties from the current struct to the dest.
func (ResourceSpans) InstrumentationLibrarySpans ¶
func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice
InstrumentationLibrarySpans returns the InstrumentationLibrarySpans associated with this ResourceSpans.
func (ResourceSpans) Resource ¶
func (ms ResourceSpans) Resource() Resource
Resource returns the resource 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 "Resize" to initialize with a given length.
func (ResourceSpansSlice) Append ¶ added in v0.5.0
func (es ResourceSpansSlice) Append(e ResourceSpans)
Append will increase the length of the ResourceSpansSlice by one and set the given ResourceSpans at that new position. The original ResourceSpans could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (ResourceSpansSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es ResourceSpansSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new ResourceSpansSlice can be initialized: es := NewResourceSpansSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SeverityNumber ¶ added in v0.8.0
type SeverityNumber int32
SeverityNumber is the public alias of otlplogs.SeverityNumber from internal package.
func (SeverityNumber) String ¶ added in v0.23.0
func (sn SeverityNumber) String() string
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#L37
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpan function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpan ¶
func NewSpan() Span
NewSpan creates a new empty Span.
This must be used only in testing code since no "Set" method available.
func (Span) Attributes ¶
func (ms Span) Attributes() AttributeMap
Attributes returns the Attributes associated with this Span.
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 ¶ added in v0.24.0
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) 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 ¶ added in v0.24.0
SetEndTimestamp replaces the endtimestamp associated with this Span.
func (Span) SetParentSpanID ¶
SetParentSpanID replaces the parentspanid associated with this Span.
func (Span) SetStartTimestamp ¶ added in v0.24.0
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 ¶ added in v0.24.0
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 since no "Set" method available.
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) 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 "Resize" to initialize with a given length.
func (SpanEventSlice) Append ¶ added in v0.5.0
func (es SpanEventSlice) Append(e SpanEvent)
Append will increase the length of the SpanEventSlice by one and set the given SpanEvent at that new position. The original SpanEvent could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (SpanEventSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es SpanEventSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new SpanEventSlice can be initialized: es := NewSpanEventSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanID ¶
type SpanID struct {
// contains filtered or unexported fields
}
SpanID is an alias of OTLP SpanID data type.
func InvalidSpanID ¶ added in v0.14.0
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 OTLP for link definition.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanLink function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanLink ¶
func NewSpanLink() SpanLink
NewSpanLink creates a new empty SpanLink.
This must be used only in testing code since no "Set" method available.
func (SpanLink) Attributes ¶
func (ms SpanLink) Attributes() AttributeMap
Attributes returns the Attributes associated with this SpanLink.
func (SpanLink) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this SpanLink.
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 "Resize" to initialize with a given length.
func (SpanLinkSlice) Append ¶ added in v0.5.0
func (es SpanLinkSlice) Append(e SpanLink)
Append will increase the length of the SpanLinkSlice by one and set the given SpanLink at that new position. The original SpanLink could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (SpanLinkSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es SpanLinkSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new SpanLinkSlice can be initialized: es := NewSpanLinkSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanSlice ¶
type SpanSlice struct {
// contains filtered or unexported fields
}
SpanSlice logically represents a slice of Span.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanSlice ¶
func NewSpanSlice() SpanSlice
NewSpanSlice creates a SpanSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SpanSlice) Append ¶ added in v0.5.0
Append will increase the length of the SpanSlice by one and set the given Span at that new position. The original Span could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (SpanSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
RemoveIf calls f sequentially for each element present in the slice. If f returns true, the element is removed from the slice.
func (SpanSlice) Resize ¶
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new SpanSlice can be initialized: es := NewSpanSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanStatus ¶
type SpanStatus struct {
// contains filtered or unexported fields
}
SpanStatus is an optional final status for this span. Semantically when Status wasn't set it is means span ended without errors and assume Status.Ok (code = 0).
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanStatus function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanStatus ¶
func NewSpanStatus() SpanStatus
NewSpanStatus creates a new empty SpanStatus.
This must be used only in testing code since no "Set" method available.
func (SpanStatus) Code ¶
func (ms SpanStatus) Code() StatusCode
Code returns the code associated with this SpanStatus.
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) 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
type StringMap ¶
type StringMap struct {
// contains filtered or unexported fields
}
StringMap stores a map of attribute keys to values.
func (StringMap) Clear ¶ added in v0.25.0
func (sm StringMap) Clear()
Clear erases any existing entries in this StringMap instance.
func (StringMap) Delete ¶
Delete deletes the entry associated with the key and returns true if the key was present in the map, otherwise returns false.
func (StringMap) EnsureCapacity ¶ added in v0.25.0
EnsureCapacity increases the capacity of this StringMap instance, if necessary, to ensure that it can hold at least the number of elements specified by the capacity argument.
func (StringMap) Get ¶
Get returns the StringValue associated with the key and true, otherwise an invalid instance of the StringKeyValue and false. Calling any functions on the returned invalid instance will cause a panic.
func (StringMap) InitFromMap ¶
InitFromMap overwrites the entire StringMap and reconstructs the StringMap with values from the given map[string]string.
Returns the same instance to allow nicer code like: assert.EqualValues(t, NewStringMap().InitFromMap(map[string]string{...}), actual)
func (StringMap) Insert ¶
Insert adds the string value to the map when the key does not exist. No action is applied to the map where the key already exists.
func (StringMap) Len ¶
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 (StringMap) Range ¶ added in v0.25.0
Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.
Example:
it := sm.Range(func(k string, v StringValue) { ... })
func (StringMap) Sort ¶
Sort sorts the entries in the StringMap so two instances can be compared. Returns the same instance to allow nicer code like: assert.EqualValues(t, expected.Sort(), actual.Sort())
type Summary ¶ added in v0.24.0
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 ¶ added in v0.24.0
func NewSummary() Summary
NewSummary creates a new empty Summary.
This must be used only in testing code since no "Set" method available.
func (Summary) CopyTo ¶ added in v0.24.0
CopyTo copies all properties from the current struct to the dest.
func (Summary) DataPoints ¶ added in v0.24.0
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 since no "Set" method available.
func (SummaryDataPoint) CopyTo ¶
func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (SummaryDataPoint) Count ¶
func (ms SummaryDataPoint) Count() uint64
Count returns the count associated with this SummaryDataPoint.
func (SummaryDataPoint) LabelsMap ¶
func (ms SummaryDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this SummaryDataPoint.
func (SummaryDataPoint) QuantileValues ¶ added in v0.24.0
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) SetStartTimestamp ¶ added in v0.24.0
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 ¶ added in v0.24.0
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 "Resize" to initialize with a given length.
func (SummaryDataPointSlice) Append ¶ added in v0.5.0
func (es SummaryDataPointSlice) Append(e SummaryDataPoint)
Append will increase the length of the SummaryDataPointSlice by one and set the given SummaryDataPoint at that new position. The original SummaryDataPoint could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (SummaryDataPointSlice) AppendEmpty ¶ added in v0.26.0
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) 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 ¶ added in v0.26.0
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) Resize ¶
func (es SummaryDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new SummaryDataPointSlice can be initialized: es := NewSummaryDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Timestamp ¶ added in v0.22.0
type Timestamp uint64
Timestamp is a time specified as UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
func TimestampFromTime ¶ added in v0.22.0
TimestampFromTime 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 ¶ added in v0.14.0
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 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 ¶ added in v0.23.0
func TracesFromInternalRep(wrapper internal.TracesWrapper) Traces
TracesFromInternalRep creates Traces from the internal representation. Should not be used outside this module.
func TracesFromOtlpProtoBytes ¶ added in v0.23.0
TracesFromOtlpProtoBytes converts OTLP Collector ExportTraceServiceRequest ProtoBuf bytes to the internal Traces.
Returns an invalid Traces instance if error is not nil.
func (Traces) InternalRep ¶ added in v0.23.0
func (td Traces) InternalRep() internal.TracesWrapper
InternalRep returns internal representation of the Traces. Should not be used outside this module.
func (Traces) OtlpProtoSize ¶ added in v0.23.0
OtlpProtoSize returns the size in bytes of this Traces encoded as OTLP Collector ExportTraceServiceRequest ProtoBuf bytes.
func (Traces) ResourceSpans ¶
func (td Traces) ResourceSpans() ResourceSpansSlice
ResourceSpans returns the ResourceSpansSlice associated with this Metrics.
func (Traces) ToOtlpProtoBytes ¶ added in v0.11.0
ToOtlpProtoBytes converts this Traces to the OTLP Collector ExportTraceServiceRequest ProtoBuf bytes.
Returns an nil byte-array if error is not nil.
type ValueAtQuantile ¶ added in v0.15.0
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 ¶ added in v0.15.0
func NewValueAtQuantile() ValueAtQuantile
NewValueAtQuantile creates a new empty ValueAtQuantile.
This must be used only in testing code since no "Set" method available.
func (ValueAtQuantile) CopyTo ¶ added in v0.15.0
func (ms ValueAtQuantile) CopyTo(dest ValueAtQuantile)
CopyTo copies all properties from the current struct to the dest.
func (ValueAtQuantile) Quantile ¶ added in v0.15.0
func (ms ValueAtQuantile) Quantile() float64
Quantile returns the quantile associated with this ValueAtQuantile.
func (ValueAtQuantile) SetQuantile ¶ added in v0.15.0
func (ms ValueAtQuantile) SetQuantile(v float64)
SetQuantile replaces the quantile associated with this ValueAtQuantile.
func (ValueAtQuantile) SetValue ¶ added in v0.15.0
func (ms ValueAtQuantile) SetValue(v float64)
SetValue replaces the value associated with this ValueAtQuantile.
func (ValueAtQuantile) Value ¶ added in v0.15.0
func (ms ValueAtQuantile) Value() float64
Value returns the value associated with this ValueAtQuantile.
type ValueAtQuantileSlice ¶ added in v0.15.0
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 ¶ added in v0.15.0
func NewValueAtQuantileSlice() ValueAtQuantileSlice
NewValueAtQuantileSlice creates a ValueAtQuantileSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (ValueAtQuantileSlice) Append ¶ added in v0.15.0
func (es ValueAtQuantileSlice) Append(e ValueAtQuantile)
Append will increase the length of the ValueAtQuantileSlice by one and set the given ValueAtQuantile at that new position. The original ValueAtQuantile could still be referenced so do not reuse it after passing it to this method. Deprecated: Use AppendEmpty.
func (ValueAtQuantileSlice) AppendEmpty ¶ added in v0.26.0
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 ¶ added in v0.15.0
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 ¶ added in v0.15.0
func (es ValueAtQuantileSlice) CopyTo(dest ValueAtQuantileSlice)
CopyTo copies all elements from the current slice to the dest.
func (ValueAtQuantileSlice) Len ¶ added in v0.15.0
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 ¶ added in v0.15.0
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 ¶ added in v0.26.0
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) Resize ¶ added in v0.15.0
func (es ValueAtQuantileSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If the newLen <= len then equivalent with slice[0:newLen:cap]. 2. If the newLen > len then (newLen - cap) empty elements will be appended to the slice.
Here is how a new ValueAtQuantileSlice can be initialized: es := NewValueAtQuantileSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }