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
- func TracesToOtlp(td Traces) []*otlptrace.ResourceSpans
- type AttributeMap
- func (am AttributeMap) CopyTo(dest AttributeMap)
- func (am AttributeMap) Delete(key string) bool
- func (am AttributeMap) ForEach(f func(k string, v AttributeValue))
- func (am AttributeMap) Get(key string) (AttributeValue, bool)
- func (am AttributeMap) InitEmptyWithCapacity(cap int)
- func (am AttributeMap) InitFromAttributeMap(attrMap AttributeMap) AttributeMap
- 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) 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 NewAttributeValueBool(v bool) AttributeValue
- func NewAttributeValueDouble(v float64) AttributeValue
- func NewAttributeValueInt(v int64) AttributeValue
- func NewAttributeValueMap() AttributeValue
- func NewAttributeValueNull() AttributeValue
- func NewAttributeValueSlice(len int) []AttributeValue
- func NewAttributeValueString(v string) AttributeValue
- func (a AttributeValue) BoolVal() bool
- 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) SetMapVal(m AttributeMap)
- 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) InitEmpty()
- func (ms DoubleDataPoint) IsNil() bool
- func (ms DoubleDataPoint) LabelsMap() StringMap
- func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms DoubleDataPoint) SetValue(v float64)
- func (ms DoubleDataPoint) StartTime() TimestampUnixNano
- func (ms DoubleDataPoint) Timestamp() TimestampUnixNano
- func (ms DoubleDataPoint) Value() float64
- type DoubleDataPointSlice
- func (es DoubleDataPointSlice) Append(e *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) Resize(newLen int)
- type HistogramBucket
- type HistogramBucketExemplar
- func (ms HistogramBucketExemplar) Attachments() StringMap
- func (ms HistogramBucketExemplar) CopyTo(dest HistogramBucketExemplar)
- func (ms HistogramBucketExemplar) InitEmpty()
- func (ms HistogramBucketExemplar) IsNil() bool
- func (ms HistogramBucketExemplar) SetTimestamp(v TimestampUnixNano)
- func (ms HistogramBucketExemplar) SetValue(v float64)
- func (ms HistogramBucketExemplar) Timestamp() TimestampUnixNano
- func (ms HistogramBucketExemplar) Value() float64
- type HistogramBucketSlice
- func (es HistogramBucketSlice) Append(e *HistogramBucket)
- func (es HistogramBucketSlice) At(ix int) HistogramBucket
- func (es HistogramBucketSlice) CopyTo(dest HistogramBucketSlice)
- func (es HistogramBucketSlice) Len() int
- func (es HistogramBucketSlice) MoveAndAppendTo(dest HistogramBucketSlice)
- func (es HistogramBucketSlice) Resize(newLen int)
- type HistogramDataPoint
- func (ms HistogramDataPoint) Buckets() HistogramBucketSlice
- func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)
- func (ms HistogramDataPoint) Count() uint64
- func (ms HistogramDataPoint) ExplicitBounds() []float64
- func (ms HistogramDataPoint) InitEmpty()
- func (ms HistogramDataPoint) IsNil() bool
- func (ms HistogramDataPoint) LabelsMap() StringMap
- func (ms HistogramDataPoint) SetCount(v uint64)
- func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
- func (ms HistogramDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms HistogramDataPoint) SetSum(v float64)
- func (ms HistogramDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms HistogramDataPoint) StartTime() TimestampUnixNano
- func (ms HistogramDataPoint) Sum() float64
- func (ms HistogramDataPoint) Timestamp() TimestampUnixNano
- type HistogramDataPointSlice
- func (es HistogramDataPointSlice) Append(e *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) Resize(newLen int)
- type InstrumentationLibrary
- func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)
- func (ms InstrumentationLibrary) InitEmpty()
- func (ms InstrumentationLibrary) IsNil() bool
- func (ms InstrumentationLibrary) Name() string
- func (ms InstrumentationLibrary) SetName(v string)
- func (ms InstrumentationLibrary) SetVersion(v string)
- func (ms InstrumentationLibrary) Version() string
- type InstrumentationLibraryMetrics
- func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)
- func (ms InstrumentationLibraryMetrics) InitEmpty()
- func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibraryMetrics) IsNil() bool
- func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice
- type InstrumentationLibraryMetricsSlice
- func (es InstrumentationLibraryMetricsSlice) Append(e *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) Resize(newLen int)
- type InstrumentationLibrarySpans
- func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)
- func (ms InstrumentationLibrarySpans) InitEmpty()
- func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
- func (ms InstrumentationLibrarySpans) IsNil() bool
- func (ms InstrumentationLibrarySpans) Spans() SpanSlice
- type InstrumentationLibrarySpansSlice
- func (es InstrumentationLibrarySpansSlice) Append(e *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) Resize(newLen int)
- type Int64DataPoint
- func (ms Int64DataPoint) CopyTo(dest Int64DataPoint)
- func (ms Int64DataPoint) InitEmpty()
- func (ms Int64DataPoint) IsNil() bool
- func (ms Int64DataPoint) LabelsMap() StringMap
- func (ms Int64DataPoint) SetStartTime(v TimestampUnixNano)
- func (ms Int64DataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms Int64DataPoint) SetValue(v int64)
- func (ms Int64DataPoint) StartTime() TimestampUnixNano
- func (ms Int64DataPoint) Timestamp() TimestampUnixNano
- func (ms Int64DataPoint) Value() int64
- type Int64DataPointSlice
- func (es Int64DataPointSlice) Append(e *Int64DataPoint)
- func (es Int64DataPointSlice) At(ix int) Int64DataPoint
- func (es Int64DataPointSlice) CopyTo(dest Int64DataPointSlice)
- func (es Int64DataPointSlice) Len() int
- func (es Int64DataPointSlice) MoveAndAppendTo(dest Int64DataPointSlice)
- func (es Int64DataPointSlice) Resize(newLen int)
- type LogRecord
- func (ms LogRecord) Attributes() AttributeMap
- func (ms LogRecord) Body() string
- func (ms LogRecord) CopyTo(dest LogRecord)
- func (ms LogRecord) DroppedAttributesCount() uint32
- func (ms LogRecord) Flags() uint32
- func (ms LogRecord) InitEmpty()
- func (ms LogRecord) IsNil() bool
- func (ms LogRecord) SetBody(v string)
- func (ms LogRecord) SetDroppedAttributesCount(v uint32)
- func (ms LogRecord) SetFlags(v uint32)
- func (ms LogRecord) SetSeverityNumber(v logsproto.SeverityNumber)
- func (ms LogRecord) SetSeverityText(v string)
- func (ms LogRecord) SetShortName(v string)
- func (ms LogRecord) SetSpanID(v SpanID)
- func (ms LogRecord) SetTimestamp(v TimestampUnixNano)
- func (ms LogRecord) SetTraceID(v TraceID)
- func (ms LogRecord) SeverityNumber() logsproto.SeverityNumber
- func (ms LogRecord) SeverityText() string
- func (ms LogRecord) ShortName() string
- func (ms LogRecord) SpanID() SpanID
- func (ms LogRecord) Timestamp() TimestampUnixNano
- func (ms LogRecord) TraceID() TraceID
- type LogSlice
- type Metric
- func (ms Metric) CopyTo(dest Metric)
- func (ms Metric) DoubleDataPoints() DoubleDataPointSlice
- func (ms Metric) HistogramDataPoints() HistogramDataPointSlice
- func (ms Metric) InitEmpty()
- func (ms Metric) Int64DataPoints() Int64DataPointSlice
- func (ms Metric) IsNil() bool
- func (ms Metric) MetricDescriptor() MetricDescriptor
- func (ms Metric) SummaryDataPoints() SummaryDataPointSlice
- type MetricDescriptor
- func (ms MetricDescriptor) CopyTo(dest MetricDescriptor)
- func (ms MetricDescriptor) Description() string
- func (ms MetricDescriptor) InitEmpty()
- func (ms MetricDescriptor) IsNil() bool
- func (ms MetricDescriptor) Name() string
- func (ms MetricDescriptor) SetDescription(v string)
- func (ms MetricDescriptor) SetName(v string)
- func (ms MetricDescriptor) SetType(v MetricType)
- func (ms MetricDescriptor) SetUnit(v string)
- func (ms MetricDescriptor) Type() MetricType
- func (ms MetricDescriptor) Unit() string
- type MetricSlice
- type MetricType
- type Metrics
- type Resource
- type ResourceLogs
- type ResourceLogsSlice
- func (es ResourceLogsSlice) Append(e *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) Resize(newLen int)
- type ResourceMetrics
- type ResourceMetricsSlice
- func (es ResourceMetricsSlice) Append(e *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) Resize(newLen int)
- type ResourceSpans
- type ResourceSpansSlice
- func (es ResourceSpansSlice) Append(e *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) Resize(newLen int)
- 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) EndTime() TimestampUnixNano
- func (ms Span) Events() SpanEventSlice
- func (ms Span) InitEmpty()
- func (ms Span) IsNil() bool
- 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) SetEndTime(v TimestampUnixNano)
- 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) SetStartTime(v TimestampUnixNano)
- func (ms Span) SetTraceID(v TraceID)
- func (ms Span) SetTraceState(v TraceState)
- func (ms Span) SpanID() SpanID
- func (ms Span) StartTime() TimestampUnixNano
- func (ms Span) Status() SpanStatus
- func (ms Span) TraceID() TraceID
- func (ms Span) TraceState() TraceState
- type SpanEvent
- func (ms SpanEvent) Attributes() AttributeMap
- func (ms SpanEvent) CopyTo(dest SpanEvent)
- func (ms SpanEvent) DroppedAttributesCount() uint32
- func (ms SpanEvent) InitEmpty()
- func (ms SpanEvent) IsNil() bool
- func (ms SpanEvent) Name() string
- func (ms SpanEvent) SetDroppedAttributesCount(v uint32)
- func (ms SpanEvent) SetName(v string)
- func (ms SpanEvent) SetTimestamp(v TimestampUnixNano)
- func (ms SpanEvent) Timestamp() TimestampUnixNano
- type SpanEventSlice
- type SpanID
- type SpanKind
- type SpanLink
- func (ms SpanLink) Attributes() AttributeMap
- func (ms SpanLink) CopyTo(dest SpanLink)
- func (ms SpanLink) DroppedAttributesCount() uint32
- func (ms SpanLink) InitEmpty()
- func (ms SpanLink) IsNil() bool
- func (ms SpanLink) SetDroppedAttributesCount(v uint32)
- func (ms SpanLink) SetSpanID(v SpanID)
- func (ms SpanLink) SetTraceID(v TraceID)
- func (ms SpanLink) SetTraceState(v TraceState)
- func (ms SpanLink) SpanID() SpanID
- func (ms SpanLink) TraceID() TraceID
- func (ms SpanLink) TraceState() TraceState
- type SpanLinkSlice
- type SpanSlice
- type SpanStatus
- type StatusCode
- type StringMap
- func (sm StringMap) CopyTo(dest StringMap)
- func (sm StringMap) Delete(k string) bool
- func (sm StringMap) ForEach(f func(k string, v StringValue))
- func (sm StringMap) Get(k string) (StringValue, bool)
- func (sm StringMap) InitEmptyWithCapacity(cap int)
- func (sm StringMap) InitFromMap(attrMap map[string]string) StringMap
- func (sm StringMap) Insert(k, v string)
- func (sm StringMap) Len() int
- func (sm StringMap) Sort() StringMap
- func (sm StringMap) Update(k, v string)
- func (sm StringMap) Upsert(k, v string)
- type StringValue
- type SummaryDataPoint
- func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
- func (ms SummaryDataPoint) Count() uint64
- func (ms SummaryDataPoint) InitEmpty()
- func (ms SummaryDataPoint) IsNil() bool
- func (ms SummaryDataPoint) LabelsMap() StringMap
- func (ms SummaryDataPoint) SetCount(v uint64)
- func (ms SummaryDataPoint) SetStartTime(v TimestampUnixNano)
- func (ms SummaryDataPoint) SetSum(v float64)
- func (ms SummaryDataPoint) SetTimestamp(v TimestampUnixNano)
- func (ms SummaryDataPoint) StartTime() TimestampUnixNano
- func (ms SummaryDataPoint) Sum() float64
- func (ms SummaryDataPoint) Timestamp() TimestampUnixNano
- func (ms SummaryDataPoint) ValueAtPercentiles() SummaryValueAtPercentileSlice
- type SummaryDataPointSlice
- func (es SummaryDataPointSlice) Append(e *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) Resize(newLen int)
- type SummaryValueAtPercentile
- func (ms SummaryValueAtPercentile) CopyTo(dest SummaryValueAtPercentile)
- func (ms SummaryValueAtPercentile) InitEmpty()
- func (ms SummaryValueAtPercentile) IsNil() bool
- func (ms SummaryValueAtPercentile) Percentile() float64
- func (ms SummaryValueAtPercentile) SetPercentile(v float64)
- func (ms SummaryValueAtPercentile) SetValue(v float64)
- func (ms SummaryValueAtPercentile) Value() float64
- type SummaryValueAtPercentileSlice
- func (es SummaryValueAtPercentileSlice) Append(e *SummaryValueAtPercentile)
- func (es SummaryValueAtPercentileSlice) At(ix int) SummaryValueAtPercentile
- func (es SummaryValueAtPercentileSlice) CopyTo(dest SummaryValueAtPercentileSlice)
- func (es SummaryValueAtPercentileSlice) Len() int
- func (es SummaryValueAtPercentileSlice) MoveAndAppendTo(dest SummaryValueAtPercentileSlice)
- func (es SummaryValueAtPercentileSlice) Resize(newLen int)
- type TimestampUnixNano
- type TraceID
- type TraceState
- type Traces
Constants ¶
const ( AttributeValueNULL = iota AttributeValueSTRING AttributeValueINT AttributeValueDOUBLE AttributeValueBOOL AttributeValueMAP )
const ( MetricTypeInvalid = MetricType(otlpmetrics.MetricDescriptor_INVALID_TYPE) MetricTypeInt64 = MetricType(otlpmetrics.MetricDescriptor_INT64) MetricTypeDouble = MetricType(otlpmetrics.MetricDescriptor_DOUBLE) MetricTypeMonotonicInt64 = MetricType(otlpmetrics.MetricDescriptor_MONOTONIC_INT64) MetricTypeMonotonicDouble = MetricType(otlpmetrics.MetricDescriptor_MONOTONIC_DOUBLE) MetricTypeHistogram = MetricType(otlpmetrics.MetricDescriptor_HISTOGRAM) MetricTypeSummary = MetricType(otlpmetrics.MetricDescriptor_SUMMARY) )
const ( SpanKindUNSPECIFIED = SpanKind(0) SpanKindINTERNAL = SpanKind(otlptrace.Span_INTERNAL) SpanKindSERVER = SpanKind(otlptrace.Span_SERVER) SpanKindCLIENT = SpanKind(otlptrace.Span_CLIENT) SpanKindPRODUCER = SpanKind(otlptrace.Span_PRODUCER) SpanKindCONSUMER = SpanKind(otlptrace.Span_CONSUMER) )
Variables ¶
This section is empty.
Functions ¶
func TracesToOtlp ¶
func TracesToOtlp(td Traces) []*otlptrace.ResourceSpans
TracesToOtlp converts the internal Traces to the OTLP.
Types ¶
type AttributeMap ¶
type AttributeMap struct {
// contains filtered or unexported fields
}
AttributeMap stores a map of attribute keys to values.
func NewAttributeMap ¶
func NewAttributeMap() AttributeMap
NewAttributeMap creates a AttributeMap with 0 elements.
func (AttributeMap) CopyTo ¶
func (am AttributeMap) CopyTo(dest AttributeMap)
CopyTo copies all elements from the current map to the dest.
func (AttributeMap) Delete ¶
func (am AttributeMap) Delete(key string) bool
Delete deletes the entry associated with the key and returns true if the key was present in the map, otherwise returns false.
func (AttributeMap) ForEach ¶
func (am AttributeMap) ForEach(f func(k string, v AttributeValue))
ForEach iterates over the every elements in the map by calling the provided func.
Example:
it := sm.ForEach(func(k string, v StringValue) { ... })
func (AttributeMap) Get ¶
func (am AttributeMap) Get(key string) (AttributeValue, bool)
Get returns the 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) InitEmptyWithCapacity ¶
func (am AttributeMap) InitEmptyWithCapacity(cap int)
InitEmptyWithCapacity constructs an empty AttributeMap with predefined slice capacity.
func (AttributeMap) InitFromAttributeMap ¶ added in v0.5.0
func (am AttributeMap) InitFromAttributeMap(attrMap AttributeMap) 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) InitFromMap ¶
func (am AttributeMap) InitFromMap(attrMap map[string]AttributeValue) AttributeMap
InitFromMap overwrites the entire AttributeMap and reconstructs the AttributeMap with values from the given map[string]string.
Returns the same instance to allow nicer code like: assert.EqualValues(t, NewAttributeMap().InitFromMap(map[string]AttributeValue{...}), actual)
func (AttributeMap) Insert ¶
func (am AttributeMap) Insert(k string, v AttributeValue)
Insert adds the AttributeValue to the map when the key does not exist. No action is applied to the map where the key already exists.
Calling this function with a zero-initialized AttributeValue struct will cause a panic.
Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.
func (AttributeMap) InsertBool ¶
func (am AttributeMap) InsertBool(k string, v bool)
Insert adds the bool Value to the map when the key does not exist. No action is applied to the map where the key already exists.
func (AttributeMap) InsertDouble ¶
func (am AttributeMap) InsertDouble(k string, v float64)
Insert adds the double Value to the map when the key does not exist. No action is applied to the map where the key already exists.
func (AttributeMap) InsertInt ¶
func (am AttributeMap) InsertInt(k string, v int64)
Insert adds the int Value to the map when the key does not exist. No action is applied to the map where the key already exists.
func (AttributeMap) InsertNull ¶ added in v0.5.0
func (am AttributeMap) InsertNull(k string)
Insert 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)
Insert adds the string Value to the map when the key does not exist. No action is applied to the map where the key already exists.
func (AttributeMap) Len ¶
func (am AttributeMap) Len() int
Len returns the length of this map.
Because the AttributeMap is represented internally by a slice of pointers, and the data are comping from the wire, it is possible that when iterating using "ForEach" to get access to fewer elements because nil elements are skipped.
func (AttributeMap) Sort ¶
func (am AttributeMap) Sort() AttributeMap
Sort sorts the entries in the AttributeMap so two instances can be compared. Returns the same instance to allow nicer code like: assert.EqualValues(t, expected.Sort(), actual.Sort())
func (AttributeMap) Update ¶
func (am AttributeMap) Update(k string, v AttributeValue)
Update updates an existing AttributeValue with a value. No action is applied to the map where the key does not exist.
Calling this function with a zero-initialized AttributeValue struct will cause a panic.
Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.
func (AttributeMap) UpdateBool ¶
func (am AttributeMap) UpdateBool(k string, v bool)
Update updates an existing bool Value with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) UpdateDouble ¶
func (am AttributeMap) UpdateDouble(k string, v float64)
Update updates an existing double Value with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) UpdateInt ¶
func (am AttributeMap) UpdateInt(k string, v int64)
Update updates an existing int Value with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) UpdateString ¶
func (am AttributeMap) UpdateString(k string, v string)
Update updates an existing string Value with a value. No action is applied to the map where the key does not exist.
func (AttributeMap) Upsert ¶
func (am AttributeMap) Upsert(k string, v AttributeValue)
Upsert performs the Insert or Update action. The AttributeValue is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
Calling this function with a zero-initialized AttributeValue struct will cause a panic.
Important: this function should not be used if the caller has access to the raw value to avoid an extra allocation.
func (AttributeMap) UpsertBool ¶
func (am AttributeMap) UpsertBool(k string, v bool)
Upsert performs the Insert or Update action. The bool Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertDouble ¶
func (am AttributeMap) UpsertDouble(k string, v float64)
Upsert performs the Insert or Update action. The double Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertInt ¶
func (am AttributeMap) UpsertInt(k string, v int64)
Upsert performs the Insert or Update action. The int Value is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
func (AttributeMap) UpsertString ¶
func (am AttributeMap) UpsertString(k string, v string)
Upsert performs the Insert or Update action. The AttributeValue is insert to the map that did not originally have the key. The key/value is updated to the map where the key already existed.
type AttributeValue ¶
type AttributeValue struct {
// contains filtered or unexported fields
}
AttributeValue represents a value of an attribute. Typically used in AttributeMap. Must use one of NewAttributeValue* functions below to create new instances.
Intended to be passed by value since internally it is just a pointer to actual value representation. For the same reason passing by value and calling setters will modify the original, e.g.:
function f1(val AttributeValue) { val.SetIntVal(234) } function f2() { v := NewAttributeValueString("a string") f1(v) _ := v.Type() // this will return AttributeValueINT }
Important: zero-initialized instance is not valid for use. All AttributeValue functions bellow must be called only on instances that are created via NewAttributeValue+ functions.
func NewAttributeValueBool ¶
func NewAttributeValueBool(v bool) AttributeValue
NewAttributeValueBool creates a new AttributeValue with the given bool value.
func NewAttributeValueDouble ¶
func NewAttributeValueDouble(v float64) AttributeValue
NewAttributeValueDouble creates a new AttributeValue with the given float64 value.
func NewAttributeValueInt ¶
func NewAttributeValueInt(v int64) AttributeValue
NewAttributeValueInt creates a new AttributeValue with the given int64 value.
func NewAttributeValueMap ¶ added in v0.5.0
func NewAttributeValueMap() AttributeValue
NewAttributeValueMap creates a new AttributeValue of array type.
func NewAttributeValueNull ¶ added in v0.5.0
func NewAttributeValueNull() AttributeValue
NewAttributeValueNull creates a new AttributeValue with a null value.
func NewAttributeValueSlice ¶
func NewAttributeValueSlice(len int) []AttributeValue
NewAttributeValueSlice creates a slice of attributes values that are correctly initialized.
func NewAttributeValueString ¶
func NewAttributeValueString(v string) AttributeValue
NewAttributeValueString creates a new AttributeValue with the given string value.
func (AttributeValue) BoolVal ¶
func (a AttributeValue) BoolVal() bool
Value returns the bool value associated with this AttributeValue. If the Type() is not AttributeValueBOOL then returns false. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) DoubleVal ¶
func (a AttributeValue) DoubleVal() float64
Value returns the float64 value associated with this AttributeValue. If the Type() is not AttributeValueDOUBLE then 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
Value returns the int64 value associated with this AttributeValue. If the Type() is not AttributeValueINT 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
Value returns the map value associated with this AttributeValue. If the Type() is not AttributeValueMAP 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 AttributeValueBOOL. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SetDoubleVal ¶
func (a AttributeValue) SetDoubleVal(v float64)
SetDoubleVal replaces the float64 value associated with this AttributeValue, it also changes the type to be AttributeValueDOUBLE. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SetIntVal ¶
func (a AttributeValue) SetIntVal(v int64)
SetIntVal replaces the int64 value associated with this AttributeValue, it also changes the type to be AttributeValueINT. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SetMapVal ¶ added in v0.5.0
func (a AttributeValue) SetMapVal(m AttributeMap)
SetMapVal replaces the value associated with this AttributeValue, it also changes the type to be AttributeValueMAP. The `m` argument will be deep copied into this AttributeValue.
Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) SetStringVal ¶
func (a AttributeValue) SetStringVal(v string)
SetStringVal replaces the string value associated with this AttributeValue, it also changes the type to be AttributeValueSTRING. Calling this function on zero-initialized AttributeValue will cause a panic.
func (AttributeValue) StringVal ¶
func (a AttributeValue) StringVal() string
Value returns the string value associated with this AttributeValue. If the Type() is not AttributeValueSTRING then 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 int
AttributeValueType specifies the type of AttributeValue.
func (AttributeValueType) String ¶
func (avt AttributeValueType) String() string
type DoubleDataPoint ¶
type DoubleDataPoint struct {
// contains filtered or unexported fields
}
DoubleDataPoint is a single data point in a timeseries that describes the time-varying value of a double metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewDoubleDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleDataPoint ¶
func NewDoubleDataPoint() DoubleDataPoint
NewDoubleDataPoint creates a new "nil" DoubleDataPoint. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (DoubleDataPoint) CopyTo ¶
func (ms DoubleDataPoint) CopyTo(dest DoubleDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (DoubleDataPoint) InitEmpty ¶
func (ms DoubleDataPoint) InitEmpty()
InitEmpty overwrites the current value with empty.
func (DoubleDataPoint) IsNil ¶
func (ms DoubleDataPoint) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (DoubleDataPoint) LabelsMap ¶
func (ms DoubleDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) SetStartTime ¶
func (ms DoubleDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) SetTimestamp ¶
func (ms DoubleDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) SetValue ¶
func (ms DoubleDataPoint) SetValue(v float64)
SetValue replaces the value associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) StartTime ¶
func (ms DoubleDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) Timestamp ¶
func (ms DoubleDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (DoubleDataPoint) Value ¶
func (ms DoubleDataPoint) Value() float64
Value returns the value associated with this DoubleDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
type DoubleDataPointSlice ¶
type DoubleDataPointSlice struct {
// contains filtered or unexported fields
}
DoubleDataPointSlice logically represents a slice of DoubleDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewDoubleDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewDoubleDataPointSlice ¶
func NewDoubleDataPointSlice() DoubleDataPointSlice
NewDoubleDataPointSlice creates a DoubleDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (DoubleDataPointSlice) 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.
func (DoubleDataPointSlice) At ¶
func (es DoubleDataPointSlice) At(ix int) DoubleDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (DoubleDataPointSlice) CopyTo ¶
func (es DoubleDataPointSlice) CopyTo(dest DoubleDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (DoubleDataPointSlice) Len ¶
func (es DoubleDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewDoubleDataPointSlice()".
func (DoubleDataPointSlice) MoveAndAppendTo ¶
func (es DoubleDataPointSlice) MoveAndAppendTo(dest DoubleDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (DoubleDataPointSlice) Resize ¶
func (es DoubleDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new DoubleDataPointSlice can be initialized: es := NewDoubleDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type HistogramBucket ¶
type HistogramBucket struct {
// contains filtered or unexported fields
}
HistogramBucket contains values for a histogram bucket.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramBucket function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramBucket ¶
func NewHistogramBucket() HistogramBucket
NewHistogramBucket creates a new "nil" HistogramBucket. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (HistogramBucket) CopyTo ¶
func (ms HistogramBucket) CopyTo(dest HistogramBucket)
CopyTo copies all properties from the current struct to the dest.
func (HistogramBucket) Count ¶
func (ms HistogramBucket) Count() uint64
Count returns the count associated with this HistogramBucket.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucket) Exemplar ¶
func (ms HistogramBucket) Exemplar() HistogramBucketExemplar
Exemplar returns the exemplar associated with this HistogramBucket. If no exemplar available, it creates an empty message and associates it with this HistogramBucket.
Empty initialized HistogramBucket will return "nil" HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucket) InitEmpty ¶
func (ms HistogramBucket) InitEmpty()
InitEmpty overwrites the current value with empty.
func (HistogramBucket) IsNil ¶
func (ms HistogramBucket) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (HistogramBucket) SetCount ¶
func (ms HistogramBucket) SetCount(v uint64)
SetCount replaces the count associated with this HistogramBucket.
Important: This causes a runtime error if IsNil() returns "true".
type HistogramBucketExemplar ¶
type HistogramBucketExemplar struct {
// contains filtered or unexported fields
}
HistogramBucketExemplar are example points that may be used to annotate aggregated Histogram values. They are metadata that gives information about a particular value added to a Histogram bucket.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramBucketExemplar function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramBucketExemplar ¶
func NewHistogramBucketExemplar() HistogramBucketExemplar
NewHistogramBucketExemplar creates a new "nil" HistogramBucketExemplar. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (HistogramBucketExemplar) Attachments ¶
func (ms HistogramBucketExemplar) Attachments() StringMap
Attachments returns the Attachments associated with this HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucketExemplar) CopyTo ¶
func (ms HistogramBucketExemplar) CopyTo(dest HistogramBucketExemplar)
CopyTo copies all properties from the current struct to the dest.
func (HistogramBucketExemplar) InitEmpty ¶
func (ms HistogramBucketExemplar) InitEmpty()
InitEmpty overwrites the current value with empty.
func (HistogramBucketExemplar) IsNil ¶
func (ms HistogramBucketExemplar) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (HistogramBucketExemplar) SetTimestamp ¶
func (ms HistogramBucketExemplar) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucketExemplar) SetValue ¶
func (ms HistogramBucketExemplar) SetValue(v float64)
SetValue replaces the value associated with this HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucketExemplar) Timestamp ¶
func (ms HistogramBucketExemplar) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramBucketExemplar) Value ¶
func (ms HistogramBucketExemplar) Value() float64
Value returns the value associated with this HistogramBucketExemplar.
Important: This causes a runtime error if IsNil() returns "true".
type HistogramBucketSlice ¶
type HistogramBucketSlice struct {
// contains filtered or unexported fields
}
HistogramBucketSlice logically represents a slice of HistogramBucket.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramBucketSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramBucketSlice ¶
func NewHistogramBucketSlice() HistogramBucketSlice
NewHistogramBucketSlice creates a HistogramBucketSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (HistogramBucketSlice) Append ¶ added in v0.5.0
func (es HistogramBucketSlice) Append(e *HistogramBucket)
Append will increase the length of the HistogramBucketSlice by one and set the given HistogramBucket at that new position. The original HistogramBucket could still be referenced so do not reuse it after passing it to this method.
func (HistogramBucketSlice) At ¶
func (es HistogramBucketSlice) At(ix int) HistogramBucket
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (HistogramBucketSlice) CopyTo ¶
func (es HistogramBucketSlice) CopyTo(dest HistogramBucketSlice)
CopyTo copies all elements from the current slice to the dest.
func (HistogramBucketSlice) Len ¶
func (es HistogramBucketSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewHistogramBucketSlice()".
func (HistogramBucketSlice) MoveAndAppendTo ¶
func (es HistogramBucketSlice) MoveAndAppendTo(dest HistogramBucketSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (HistogramBucketSlice) Resize ¶
func (es HistogramBucketSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new HistogramBucketSlice can be initialized: es := NewHistogramBucketSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type HistogramDataPoint ¶
type HistogramDataPoint struct {
// contains filtered or unexported fields
}
HistogramDataPoint is a single data point in a timeseries that describes the time-varying values of a Histogram.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramDataPoint ¶
func NewHistogramDataPoint() HistogramDataPoint
NewHistogramDataPoint creates a new "nil" HistogramDataPoint. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (HistogramDataPoint) Buckets ¶
func (ms HistogramDataPoint) Buckets() HistogramBucketSlice
Buckets returns the Buckets associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) CopyTo ¶
func (ms HistogramDataPoint) CopyTo(dest HistogramDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (HistogramDataPoint) Count ¶
func (ms HistogramDataPoint) Count() uint64
Count returns the count associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) ExplicitBounds ¶
func (ms HistogramDataPoint) ExplicitBounds() []float64
ExplicitBounds returns the explicitbounds associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) InitEmpty ¶
func (ms HistogramDataPoint) InitEmpty()
InitEmpty overwrites the current value with empty.
func (HistogramDataPoint) IsNil ¶
func (ms HistogramDataPoint) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (HistogramDataPoint) LabelsMap ¶
func (ms HistogramDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) SetCount ¶
func (ms HistogramDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) SetExplicitBounds ¶
func (ms HistogramDataPoint) SetExplicitBounds(v []float64)
SetExplicitBounds replaces the explicitbounds associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) SetStartTime ¶
func (ms HistogramDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) SetSum ¶
func (ms HistogramDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) SetTimestamp ¶
func (ms HistogramDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) StartTime ¶
func (ms HistogramDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) Sum ¶
func (ms HistogramDataPoint) Sum() float64
Sum returns the sum associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (HistogramDataPoint) Timestamp ¶
func (ms HistogramDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this HistogramDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
type HistogramDataPointSlice ¶
type HistogramDataPointSlice struct {
// contains filtered or unexported fields
}
HistogramDataPointSlice logically represents a slice of HistogramDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewHistogramDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewHistogramDataPointSlice ¶
func NewHistogramDataPointSlice() HistogramDataPointSlice
NewHistogramDataPointSlice creates a HistogramDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (HistogramDataPointSlice) 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.
func (HistogramDataPointSlice) At ¶
func (es HistogramDataPointSlice) At(ix int) HistogramDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (HistogramDataPointSlice) CopyTo ¶
func (es HistogramDataPointSlice) CopyTo(dest HistogramDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (HistogramDataPointSlice) Len ¶
func (es HistogramDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewHistogramDataPointSlice()".
func (HistogramDataPointSlice) MoveAndAppendTo ¶
func (es HistogramDataPointSlice) MoveAndAppendTo(dest HistogramDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (HistogramDataPointSlice) Resize ¶
func (es HistogramDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new HistogramDataPointSlice can be initialized: es := NewHistogramDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type InstrumentationLibrary ¶
type InstrumentationLibrary struct {
// contains filtered or unexported fields
}
InstrumentationLibrary is a message representing the instrumentation library information.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibrary function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrary ¶
func NewInstrumentationLibrary() InstrumentationLibrary
NewInstrumentationLibrary creates a new "nil" InstrumentationLibrary. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibrary) CopyTo ¶
func (ms InstrumentationLibrary) CopyTo(dest InstrumentationLibrary)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrary) InitEmpty ¶
func (ms InstrumentationLibrary) InitEmpty()
InitEmpty overwrites the current value with empty.
func (InstrumentationLibrary) IsNil ¶
func (ms InstrumentationLibrary) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (InstrumentationLibrary) Name ¶
func (ms InstrumentationLibrary) Name() string
Name returns the name associated with this InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
func (InstrumentationLibrary) SetName ¶
func (ms InstrumentationLibrary) SetName(v string)
SetName replaces the name associated with this InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
func (InstrumentationLibrary) SetVersion ¶
func (ms InstrumentationLibrary) SetVersion(v string)
SetVersion replaces the version associated with this InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
func (InstrumentationLibrary) Version ¶
func (ms InstrumentationLibrary) Version() string
Version returns the version associated with this InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
type InstrumentationLibraryMetrics ¶
type InstrumentationLibraryMetrics struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetrics is a collection of metrics from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibraryMetrics function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibraryMetrics ¶
func NewInstrumentationLibraryMetrics() InstrumentationLibraryMetrics
NewInstrumentationLibraryMetrics creates a new "nil" InstrumentationLibraryMetrics. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibraryMetrics) CopyTo ¶
func (ms InstrumentationLibraryMetrics) CopyTo(dest InstrumentationLibraryMetrics)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibraryMetrics) InitEmpty ¶
func (ms InstrumentationLibraryMetrics) InitEmpty()
InitEmpty overwrites the current value with empty.
func (InstrumentationLibraryMetrics) InstrumentationLibrary ¶
func (ms InstrumentationLibraryMetrics) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibraryMetrics. If no instrumentationlibrary available, it creates an empty message and associates it with this InstrumentationLibraryMetrics.
Empty initialized InstrumentationLibraryMetrics will return "nil" InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
func (InstrumentationLibraryMetrics) IsNil ¶
func (ms InstrumentationLibraryMetrics) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (InstrumentationLibraryMetrics) Metrics ¶
func (ms InstrumentationLibraryMetrics) Metrics() MetricSlice
Metrics returns the Metrics associated with this InstrumentationLibraryMetrics.
Important: This causes a runtime error if IsNil() returns "true".
type InstrumentationLibraryMetricsSlice ¶
type InstrumentationLibraryMetricsSlice struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetricsSlice logically represents a slice of InstrumentationLibraryMetrics.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibraryMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibraryMetricsSlice ¶
func NewInstrumentationLibraryMetricsSlice() InstrumentationLibraryMetricsSlice
NewInstrumentationLibraryMetricsSlice creates a InstrumentationLibraryMetricsSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (InstrumentationLibraryMetricsSlice) 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.
func (InstrumentationLibraryMetricsSlice) At ¶
func (es InstrumentationLibraryMetricsSlice) At(ix int) InstrumentationLibraryMetrics
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (InstrumentationLibraryMetricsSlice) CopyTo ¶
func (es InstrumentationLibraryMetricsSlice) CopyTo(dest InstrumentationLibraryMetricsSlice)
CopyTo copies all elements from the current slice to the dest.
func (InstrumentationLibraryMetricsSlice) Len ¶
func (es InstrumentationLibraryMetricsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewInstrumentationLibraryMetricsSlice()".
func (InstrumentationLibraryMetricsSlice) MoveAndAppendTo ¶
func (es InstrumentationLibraryMetricsSlice) MoveAndAppendTo(dest InstrumentationLibraryMetricsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (InstrumentationLibraryMetricsSlice) Resize ¶
func (es InstrumentationLibraryMetricsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new InstrumentationLibraryMetricsSlice can be initialized: es := NewInstrumentationLibraryMetricsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type InstrumentationLibrarySpans ¶
type InstrumentationLibrarySpans struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibrarySpans function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrarySpans ¶
func NewInstrumentationLibrarySpans() InstrumentationLibrarySpans
NewInstrumentationLibrarySpans creates a new "nil" InstrumentationLibrarySpans. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (InstrumentationLibrarySpans) CopyTo ¶
func (ms InstrumentationLibrarySpans) CopyTo(dest InstrumentationLibrarySpans)
CopyTo copies all properties from the current struct to the dest.
func (InstrumentationLibrarySpans) InitEmpty ¶
func (ms InstrumentationLibrarySpans) InitEmpty()
InitEmpty overwrites the current value with empty.
func (InstrumentationLibrarySpans) InstrumentationLibrary ¶
func (ms InstrumentationLibrarySpans) InstrumentationLibrary() InstrumentationLibrary
InstrumentationLibrary returns the instrumentationlibrary associated with this InstrumentationLibrarySpans. If no instrumentationlibrary available, it creates an empty message and associates it with this InstrumentationLibrarySpans.
Empty initialized InstrumentationLibrarySpans will return "nil" InstrumentationLibrary.
Important: This causes a runtime error if IsNil() returns "true".
func (InstrumentationLibrarySpans) IsNil ¶
func (ms InstrumentationLibrarySpans) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (InstrumentationLibrarySpans) Spans ¶
func (ms InstrumentationLibrarySpans) Spans() SpanSlice
Spans returns the Spans associated with this InstrumentationLibrarySpans.
Important: This causes a runtime error if IsNil() returns "true".
type InstrumentationLibrarySpansSlice ¶
type InstrumentationLibrarySpansSlice struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpansSlice logically represents a slice of InstrumentationLibrarySpans.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInstrumentationLibrarySpansSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInstrumentationLibrarySpansSlice ¶
func NewInstrumentationLibrarySpansSlice() InstrumentationLibrarySpansSlice
NewInstrumentationLibrarySpansSlice creates a InstrumentationLibrarySpansSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (InstrumentationLibrarySpansSlice) 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.
func (InstrumentationLibrarySpansSlice) At ¶
func (es InstrumentationLibrarySpansSlice) At(ix int) InstrumentationLibrarySpans
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (InstrumentationLibrarySpansSlice) CopyTo ¶
func (es InstrumentationLibrarySpansSlice) CopyTo(dest InstrumentationLibrarySpansSlice)
CopyTo copies all elements from the current slice to the dest.
func (InstrumentationLibrarySpansSlice) Len ¶
func (es InstrumentationLibrarySpansSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewInstrumentationLibrarySpansSlice()".
func (InstrumentationLibrarySpansSlice) MoveAndAppendTo ¶
func (es InstrumentationLibrarySpansSlice) MoveAndAppendTo(dest InstrumentationLibrarySpansSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (InstrumentationLibrarySpansSlice) Resize ¶
func (es InstrumentationLibrarySpansSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new InstrumentationLibrarySpansSlice can be initialized: es := NewInstrumentationLibrarySpansSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Int64DataPoint ¶
type Int64DataPoint struct {
// contains filtered or unexported fields
}
Int64DataPoint is a single data point in a timeseries that describes the time-varying values of a int64 metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInt64DataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInt64DataPoint ¶
func NewInt64DataPoint() Int64DataPoint
NewInt64DataPoint creates a new "nil" Int64DataPoint. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (Int64DataPoint) CopyTo ¶
func (ms Int64DataPoint) CopyTo(dest Int64DataPoint)
CopyTo copies all properties from the current struct to the dest.
func (Int64DataPoint) InitEmpty ¶
func (ms Int64DataPoint) InitEmpty()
InitEmpty overwrites the current value with empty.
func (Int64DataPoint) IsNil ¶
func (ms Int64DataPoint) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (Int64DataPoint) LabelsMap ¶
func (ms Int64DataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) SetStartTime ¶
func (ms Int64DataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) SetTimestamp ¶
func (ms Int64DataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) SetValue ¶
func (ms Int64DataPoint) SetValue(v int64)
SetValue replaces the value associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) StartTime ¶
func (ms Int64DataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) Timestamp ¶
func (ms Int64DataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (Int64DataPoint) Value ¶
func (ms Int64DataPoint) Value() int64
Value returns the value associated with this Int64DataPoint.
Important: This causes a runtime error if IsNil() returns "true".
type Int64DataPointSlice ¶
type Int64DataPointSlice struct {
// contains filtered or unexported fields
}
Int64DataPointSlice logically represents a slice of Int64DataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewInt64DataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewInt64DataPointSlice ¶
func NewInt64DataPointSlice() Int64DataPointSlice
NewInt64DataPointSlice creates a Int64DataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (Int64DataPointSlice) Append ¶ added in v0.5.0
func (es Int64DataPointSlice) Append(e *Int64DataPoint)
Append will increase the length of the Int64DataPointSlice by one and set the given Int64DataPoint at that new position. The original Int64DataPoint could still be referenced so do not reuse it after passing it to this method.
func (Int64DataPointSlice) At ¶
func (es Int64DataPointSlice) At(ix int) Int64DataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (Int64DataPointSlice) CopyTo ¶
func (es Int64DataPointSlice) CopyTo(dest Int64DataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (Int64DataPointSlice) Len ¶
func (es Int64DataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewInt64DataPointSlice()".
func (Int64DataPointSlice) MoveAndAppendTo ¶
func (es Int64DataPointSlice) MoveAndAppendTo(dest Int64DataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (Int64DataPointSlice) Resize ¶
func (es Int64DataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new Int64DataPointSlice can be initialized: es := NewInt64DataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type LogRecord ¶
type LogRecord struct {
// contains filtered or unexported fields
}
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewLogRecord function to create new instances. Important: zero-initialized instance is not valid for use.
func NewLogRecord ¶
func NewLogRecord() LogRecord
NewLogRecord creates a new "nil" LogRecord. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (LogRecord) Attributes ¶
func (ms LogRecord) Attributes() AttributeMap
Attributes returns the Attributes associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) Body ¶
Body returns the body associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) Flags ¶
Flags returns the flags associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) InitEmpty ¶
func (ms LogRecord) InitEmpty()
InitEmpty overwrites the current value with empty.
func (LogRecord) IsNil ¶
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (LogRecord) SetBody ¶
SetBody replaces the body associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetFlags ¶
SetFlags replaces the flags associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetSeverityNumber ¶
func (ms LogRecord) SetSeverityNumber(v logsproto.SeverityNumber)
SetSeverityNumber replaces the severitynumber associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetSeverityText ¶
SetSeverityText replaces the severitytext associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetShortName ¶
SetShortName replaces the shortname associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetSpanID ¶
SetSpanID replaces the spanid associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetTimestamp ¶
func (ms LogRecord) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SetTraceID ¶
SetTraceID replaces the traceid associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SeverityNumber ¶
func (ms LogRecord) SeverityNumber() logsproto.SeverityNumber
SeverityNumber returns the severitynumber associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SeverityText ¶
SeverityText returns the severitytext associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) ShortName ¶
ShortName returns the shortname associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) SpanID ¶
SpanID returns the spanid associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
func (LogRecord) Timestamp ¶
func (ms LogRecord) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this LogRecord.
Important: This causes a runtime error if IsNil() returns "true".
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.
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) Resize ¶
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new LogSlice can be initialized: es := NewLogSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric represents one metric as a collection of datapoints. See Metric definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/metrics/v1/metrics.proto#L96
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewMetric function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetric ¶
func NewMetric() Metric
NewMetric creates a new "nil" Metric. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (Metric) DoubleDataPoints ¶
func (ms Metric) DoubleDataPoints() DoubleDataPointSlice
DoubleDataPoints returns the DoubleDataPoints associated with this Metric.
Important: This causes a runtime error if IsNil() returns "true".
func (Metric) HistogramDataPoints ¶
func (ms Metric) HistogramDataPoints() HistogramDataPointSlice
HistogramDataPoints returns the HistogramDataPoints associated with this Metric.
Important: This causes a runtime error if IsNil() returns "true".
func (Metric) InitEmpty ¶
func (ms Metric) InitEmpty()
InitEmpty overwrites the current value with empty.
func (Metric) Int64DataPoints ¶
func (ms Metric) Int64DataPoints() Int64DataPointSlice
Int64DataPoints returns the Int64DataPoints associated with this Metric.
Important: This causes a runtime error if IsNil() returns "true".
func (Metric) IsNil ¶
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (Metric) MetricDescriptor ¶
func (ms Metric) MetricDescriptor() MetricDescriptor
MetricDescriptor returns the metricdescriptor associated with this Metric. If no metricdescriptor available, it creates an empty message and associates it with this Metric.
Empty initialized Metric will return "nil" MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (Metric) SummaryDataPoints ¶
func (ms Metric) SummaryDataPoints() SummaryDataPointSlice
SummaryDataPoints returns the SummaryDataPoints associated with this Metric.
Important: This causes a runtime error if IsNil() returns "true".
type MetricDescriptor ¶
type MetricDescriptor struct {
// contains filtered or unexported fields
}
MetricDescriptor is the descriptor of a metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewMetricDescriptor function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetricDescriptor ¶
func NewMetricDescriptor() MetricDescriptor
NewMetricDescriptor creates a new "nil" MetricDescriptor. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (MetricDescriptor) CopyTo ¶
func (ms MetricDescriptor) CopyTo(dest MetricDescriptor)
CopyTo copies all properties from the current struct to the dest.
func (MetricDescriptor) Description ¶
func (ms MetricDescriptor) Description() string
Description returns the description associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) InitEmpty ¶
func (ms MetricDescriptor) InitEmpty()
InitEmpty overwrites the current value with empty.
func (MetricDescriptor) IsNil ¶
func (ms MetricDescriptor) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (MetricDescriptor) Name ¶
func (ms MetricDescriptor) Name() string
Name returns the name associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) SetDescription ¶
func (ms MetricDescriptor) SetDescription(v string)
SetDescription replaces the description associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) SetName ¶
func (ms MetricDescriptor) SetName(v string)
SetName replaces the name associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) SetType ¶
func (ms MetricDescriptor) SetType(v MetricType)
SetType replaces the type associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) SetUnit ¶
func (ms MetricDescriptor) SetUnit(v string)
SetUnit replaces the unit associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) Type ¶
func (ms MetricDescriptor) Type() MetricType
Type returns the type associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
func (MetricDescriptor) Unit ¶
func (ms MetricDescriptor) Unit() string
Unit returns the unit associated with this MetricDescriptor.
Important: This causes a runtime error if IsNil() returns "true".
type MetricSlice ¶
type MetricSlice struct {
// contains filtered or unexported fields
}
MetricSlice logically represents a slice of Metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewMetricSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewMetricSlice ¶
func NewMetricSlice() MetricSlice
NewMetricSlice creates a MetricSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (MetricSlice) 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.
func (MetricSlice) At ¶
func (es MetricSlice) At(ix int) Metric
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (MetricSlice) CopyTo ¶
func (es MetricSlice) CopyTo(dest MetricSlice)
CopyTo copies all elements from the current slice to the dest.
func (MetricSlice) Len ¶
func (es MetricSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewMetricSlice()".
func (MetricSlice) MoveAndAppendTo ¶
func (es MetricSlice) MoveAndAppendTo(dest MetricSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (MetricSlice) Resize ¶
func (es MetricSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new MetricSlice can be initialized: es := NewMetricSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type MetricType ¶
type MetricType otlpmetrics.MetricDescriptor_Type
func (MetricType) String ¶
func (mt MetricType) String() string
type Metrics ¶
type Metrics struct {
InternalOpaque interface{}
}
Metrics is an opaque interface that allows transition to the new internal Metrics data, but also facilitate the transition to the new components especially for traces.
Outside of the core repository the metrics pipeline cannot be converted to the new model since data.MetricData is part of the internal package.
IMPORTANT: Do not try to convert to/from this manually, use the helper functions in the pdatautil instead.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource information.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResource function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResource ¶
func NewResource() Resource
NewResource creates a new "nil" Resource. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (Resource) Attributes ¶
func (ms Resource) Attributes() AttributeMap
Attributes returns the Attributes associated with this Resource.
Important: This causes a runtime error if IsNil() returns "true".
type ResourceLogs ¶
type ResourceLogs struct {
// contains filtered or unexported fields
}
ResourceLogs is a collection of logs from a Resource.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceLogs function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceLogs ¶
func NewResourceLogs() ResourceLogs
NewResourceLogs creates a new "nil" ResourceLogs. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (ResourceLogs) CopyTo ¶
func (ms ResourceLogs) CopyTo(dest ResourceLogs)
CopyTo copies all properties from the current struct to the dest.
func (ResourceLogs) InitEmpty ¶
func (ms ResourceLogs) InitEmpty()
InitEmpty overwrites the current value with empty.
func (ResourceLogs) IsNil ¶
func (ms ResourceLogs) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (ResourceLogs) Logs ¶
func (ms ResourceLogs) Logs() LogSlice
Logs returns the Logs associated with this ResourceLogs.
Important: This causes a runtime error if IsNil() returns "true".
func (ResourceLogs) Resource ¶
func (ms ResourceLogs) Resource() Resource
Resource returns the resource associated with this ResourceLogs. If no resource available, it creates an empty message and associates it with this ResourceLogs.
Empty initialized ResourceLogs will return "nil" Resource.
Important: This causes a runtime error if IsNil() returns "true".
type ResourceLogsSlice ¶
type ResourceLogsSlice struct {
// contains filtered or unexported fields
}
ResourceLogsSlice logically represents a slice of ResourceLogs.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceLogsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceLogsSlice ¶
func NewResourceLogsSlice() ResourceLogsSlice
NewResourceLogsSlice creates a ResourceLogsSlice with 0 elements. Can use "Resize" to initialize with a given length.
func NewResourceLogsSliceFromOrig ¶
func NewResourceLogsSliceFromOrig(orig *[]*logsproto.ResourceLogs) ResourceLogsSlice
NewResourceLogsSliceFromOrig creates ResourceLogsSlice from logsproto.ResourceLogs. This function simply makes generated newResourceLogsSlice() function publicly available for internal.data.Log to call. We intentionally placed data.Log in the internal package so that it is not available publicly while it is experimental. Once the expriment is over data.Log should move to this package (pdata) and NewResourceLogsSliceFromOrig function will no longer be needed.
func (ResourceLogsSlice) 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.
func (ResourceLogsSlice) At ¶
func (es ResourceLogsSlice) At(ix int) ResourceLogs
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ResourceLogsSlice) CopyTo ¶
func (es ResourceLogsSlice) CopyTo(dest ResourceLogsSlice)
CopyTo copies all elements from the current slice to the dest.
func (ResourceLogsSlice) Len ¶
func (es ResourceLogsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewResourceLogsSlice()".
func (ResourceLogsSlice) MoveAndAppendTo ¶
func (es ResourceLogsSlice) MoveAndAppendTo(dest ResourceLogsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ResourceLogsSlice) Resize ¶
func (es ResourceLogsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new ResourceLogsSlice can be initialized: es := NewResourceLogsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
InstrumentationLibraryMetrics is a collection of metrics from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceMetrics function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceMetrics ¶
func NewResourceMetrics() ResourceMetrics
NewResourceMetrics creates a new "nil" ResourceMetrics. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (ResourceMetrics) CopyTo ¶
func (ms ResourceMetrics) CopyTo(dest ResourceMetrics)
CopyTo copies all properties from the current struct to the dest.
func (ResourceMetrics) InitEmpty ¶
func (ms ResourceMetrics) InitEmpty()
InitEmpty overwrites the current value with empty.
func (ResourceMetrics) InstrumentationLibraryMetrics ¶
func (ms ResourceMetrics) InstrumentationLibraryMetrics() InstrumentationLibraryMetricsSlice
InstrumentationLibraryMetrics returns the InstrumentationLibraryMetrics associated with this ResourceMetrics.
Important: This causes a runtime error if IsNil() returns "true".
func (ResourceMetrics) IsNil ¶
func (ms ResourceMetrics) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (ResourceMetrics) Resource ¶
func (ms ResourceMetrics) Resource() Resource
Resource returns the resource associated with this ResourceMetrics. If no resource available, it creates an empty message and associates it with this ResourceMetrics.
Empty initialized ResourceMetrics will return "nil" Resource.
Important: This causes a runtime error if IsNil() returns "true".
type ResourceMetricsSlice ¶
type ResourceMetricsSlice struct {
// contains filtered or unexported fields
}
ResourceMetricsSlice logically represents a slice of ResourceMetrics.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceMetricsSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func InternalNewMetricsResourceSlice ¶
func InternalNewMetricsResourceSlice(orig *[]*otlpmetrics.ResourceMetrics) ResourceMetricsSlice
InternalNewMetricsResourceSlice is a helper
func NewResourceMetricsSlice ¶
func NewResourceMetricsSlice() ResourceMetricsSlice
NewResourceMetricsSlice creates a ResourceMetricsSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (ResourceMetricsSlice) 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.
func (ResourceMetricsSlice) At ¶
func (es ResourceMetricsSlice) At(ix int) ResourceMetrics
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ResourceMetricsSlice) CopyTo ¶
func (es ResourceMetricsSlice) CopyTo(dest ResourceMetricsSlice)
CopyTo copies all elements from the current slice to the dest.
func (ResourceMetricsSlice) Len ¶
func (es ResourceMetricsSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewResourceMetricsSlice()".
func (ResourceMetricsSlice) MoveAndAppendTo ¶
func (es ResourceMetricsSlice) MoveAndAppendTo(dest ResourceMetricsSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ResourceMetricsSlice) Resize ¶
func (es ResourceMetricsSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new ResourceMetricsSlice can be initialized: es := NewResourceMetricsSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type ResourceSpans ¶
type ResourceSpans struct {
// contains filtered or unexported fields
}
InstrumentationLibrarySpans is a collection of spans from a LibraryInstrumentation.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceSpans function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceSpans ¶
func NewResourceSpans() ResourceSpans
NewResourceSpans creates a new "nil" ResourceSpans. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (ResourceSpans) CopyTo ¶
func (ms ResourceSpans) CopyTo(dest ResourceSpans)
CopyTo copies all properties from the current struct to the dest.
func (ResourceSpans) InitEmpty ¶
func (ms ResourceSpans) InitEmpty()
InitEmpty overwrites the current value with empty.
func (ResourceSpans) InstrumentationLibrarySpans ¶
func (ms ResourceSpans) InstrumentationLibrarySpans() InstrumentationLibrarySpansSlice
InstrumentationLibrarySpans returns the InstrumentationLibrarySpans associated with this ResourceSpans.
Important: This causes a runtime error if IsNil() returns "true".
func (ResourceSpans) IsNil ¶
func (ms ResourceSpans) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (ResourceSpans) Resource ¶
func (ms ResourceSpans) Resource() Resource
Resource returns the resource associated with this ResourceSpans. If no resource available, it creates an empty message and associates it with this ResourceSpans.
Empty initialized ResourceSpans will return "nil" Resource.
Important: This causes a runtime error if IsNil() returns "true".
type ResourceSpansSlice ¶
type ResourceSpansSlice struct {
// contains filtered or unexported fields
}
ResourceSpansSlice logically represents a slice of ResourceSpans.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewResourceSpansSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewResourceSpansSlice ¶
func NewResourceSpansSlice() ResourceSpansSlice
NewResourceSpansSlice creates a ResourceSpansSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (ResourceSpansSlice) 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.
func (ResourceSpansSlice) At ¶
func (es ResourceSpansSlice) At(ix int) ResourceSpans
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (ResourceSpansSlice) CopyTo ¶
func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice)
CopyTo copies all elements from the current slice to the dest.
func (ResourceSpansSlice) Len ¶
func (es ResourceSpansSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewResourceSpansSlice()".
func (ResourceSpansSlice) MoveAndAppendTo ¶
func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (ResourceSpansSlice) Resize ¶
func (es ResourceSpansSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new ResourceSpansSlice can be initialized: es := NewResourceSpansSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span represents a single operation within a trace. See Span definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/master/opentelemetry/proto/trace/v1/trace.proto#L37
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpan function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpan ¶
func NewSpan() Span
NewSpan creates a new "nil" Span. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (Span) Attributes ¶
func (ms Span) Attributes() AttributeMap
Attributes returns the Attributes associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) DroppedEventsCount ¶
DroppedEventsCount returns the droppedeventscount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) DroppedLinksCount ¶
DroppedLinksCount returns the droppedlinkscount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) EndTime ¶
func (ms Span) EndTime() TimestampUnixNano
EndTime returns the endtime associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) Events ¶
func (ms Span) Events() SpanEventSlice
Events returns the Events associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) InitEmpty ¶
func (ms Span) InitEmpty()
InitEmpty overwrites the current value with empty.
func (Span) IsNil ¶
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (Span) Kind ¶
Kind returns the kind associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) Links ¶
func (ms Span) Links() SpanLinkSlice
Links returns the Links associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) Name ¶
Name returns the name associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) ParentSpanID ¶
ParentSpanID returns the parentspanid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetDroppedEventsCount ¶
SetDroppedEventsCount replaces the droppedeventscount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetDroppedLinksCount ¶
SetDroppedLinksCount replaces the droppedlinkscount associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetEndTime ¶
func (ms Span) SetEndTime(v TimestampUnixNano)
SetEndTime replaces the endtime associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetKind ¶
SetKind replaces the kind associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetName ¶
SetName replaces the name associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetParentSpanID ¶
SetParentSpanID replaces the parentspanid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetSpanID ¶
SetSpanID replaces the spanid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetStartTime ¶
func (ms Span) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetTraceID ¶
SetTraceID replaces the traceid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SetTraceState ¶
func (ms Span) SetTraceState(v TraceState)
SetTraceState replaces the tracestate associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) SpanID ¶
SpanID returns the spanid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) StartTime ¶
func (ms Span) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) Status ¶
func (ms Span) Status() SpanStatus
Status returns the status associated with this Span. If no status available, it creates an empty message and associates it with this Span.
Empty initialized Span will return "nil" SpanStatus.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) TraceID ¶
TraceID returns the traceid associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
func (Span) TraceState ¶
func (ms Span) TraceState() TraceState
TraceState returns the tracestate associated with this Span.
Important: This causes a runtime error if IsNil() returns "true".
type SpanEvent ¶
type SpanEvent struct {
// contains filtered or unexported fields
}
SpanEvent is a time-stamped annotation of the span, consisting of user-supplied text description and key-value pairs. See OTLP for event definition.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanEvent function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanEvent ¶
func NewSpanEvent() SpanEvent
NewSpanEvent creates a new "nil" SpanEvent. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (SpanEvent) Attributes ¶
func (ms SpanEvent) Attributes() AttributeMap
Attributes returns the Attributes associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) InitEmpty ¶
func (ms SpanEvent) InitEmpty()
InitEmpty overwrites the current value with empty.
func (SpanEvent) IsNil ¶
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (SpanEvent) Name ¶
Name returns the name associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) SetName ¶
SetName replaces the name associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) SetTimestamp ¶
func (ms SpanEvent) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanEvent) Timestamp ¶
func (ms SpanEvent) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this SpanEvent.
Important: This causes a runtime error if IsNil() returns "true".
type SpanEventSlice ¶
type SpanEventSlice struct {
// contains filtered or unexported fields
}
SpanEventSlice logically represents a slice of SpanEvent.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanEventSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanEventSlice ¶
func NewSpanEventSlice() SpanEventSlice
NewSpanEventSlice creates a SpanEventSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SpanEventSlice) 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.
func (SpanEventSlice) At ¶
func (es SpanEventSlice) At(ix int) SpanEvent
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SpanEventSlice) CopyTo ¶
func (es SpanEventSlice) CopyTo(dest SpanEventSlice)
CopyTo copies all elements from the current slice to the dest.
func (SpanEventSlice) Len ¶
func (es SpanEventSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSpanEventSlice()".
func (SpanEventSlice) MoveAndAppendTo ¶
func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SpanEventSlice) Resize ¶
func (es SpanEventSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new SpanEventSlice can be initialized: es := NewSpanEventSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanKind ¶
type SpanKind otlptrace.Span_SpanKind
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 "nil" SpanLink. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (SpanLink) Attributes ¶
func (ms SpanLink) Attributes() AttributeMap
Attributes returns the Attributes associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) DroppedAttributesCount ¶
DroppedAttributesCount returns the droppedattributescount associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) InitEmpty ¶
func (ms SpanLink) InitEmpty()
InitEmpty overwrites the current value with empty.
func (SpanLink) IsNil ¶
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (SpanLink) SetDroppedAttributesCount ¶
SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) SetSpanID ¶
SetSpanID replaces the spanid associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) SetTraceID ¶
SetTraceID replaces the traceid associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) SetTraceState ¶
func (ms SpanLink) SetTraceState(v TraceState)
SetTraceState replaces the tracestate associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) SpanID ¶
SpanID returns the spanid associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) TraceID ¶
TraceID returns the traceid associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanLink) TraceState ¶
func (ms SpanLink) TraceState() TraceState
TraceState returns the tracestate associated with this SpanLink.
Important: This causes a runtime error if IsNil() returns "true".
type SpanLinkSlice ¶
type SpanLinkSlice struct {
// contains filtered or unexported fields
}
SpanLinkSlice logically represents a slice of SpanLink.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanLinkSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanLinkSlice ¶
func NewSpanLinkSlice() SpanLinkSlice
NewSpanLinkSlice creates a SpanLinkSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SpanLinkSlice) 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.
func (SpanLinkSlice) At ¶
func (es SpanLinkSlice) At(ix int) SpanLink
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SpanLinkSlice) CopyTo ¶
func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice)
CopyTo copies all elements from the current slice to the dest.
func (SpanLinkSlice) Len ¶
func (es SpanLinkSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSpanLinkSlice()".
func (SpanLinkSlice) MoveAndAppendTo ¶
func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SpanLinkSlice) Resize ¶
func (es SpanLinkSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new SpanLinkSlice can be initialized: es := NewSpanLinkSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanSlice ¶
type SpanSlice struct {
// contains filtered or unexported fields
}
SpanSlice logically represents a slice of Span.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanSlice ¶
func NewSpanSlice() SpanSlice
NewSpanSlice creates a SpanSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SpanSlice) 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.
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) Resize ¶
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new SpanSlice can be initialized: es := NewSpanSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SpanStatus ¶
type SpanStatus struct {
// contains filtered or unexported fields
}
SpanStatus is an optional final status for this span. Semantically when Status wasn't set it is means span ended without errors and assume Status.Ok (code = 0).
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSpanStatus function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSpanStatus ¶
func NewSpanStatus() SpanStatus
NewSpanStatus creates a new "nil" SpanStatus. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (SpanStatus) Code ¶
func (ms SpanStatus) Code() StatusCode
Code returns the code associated with this SpanStatus.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanStatus) CopyTo ¶
func (ms SpanStatus) CopyTo(dest SpanStatus)
CopyTo copies all properties from the current struct to the dest.
func (SpanStatus) InitEmpty ¶
func (ms SpanStatus) InitEmpty()
InitEmpty overwrites the current value with empty.
func (SpanStatus) IsNil ¶
func (ms SpanStatus) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (SpanStatus) Message ¶
func (ms SpanStatus) Message() string
Message returns the message associated with this SpanStatus.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanStatus) SetCode ¶
func (ms SpanStatus) SetCode(v StatusCode)
SetCode replaces the code associated with this SpanStatus.
Important: This causes a runtime error if IsNil() returns "true".
func (SpanStatus) SetMessage ¶
func (ms SpanStatus) SetMessage(v string)
SetMessage replaces the message associated with this SpanStatus.
Important: This causes a runtime error if IsNil() returns "true".
type StatusCode ¶
type StatusCode otlptrace.Status_StatusCode
StatusCode mirrors the codes defined at https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#statuscanonicalcode and is numerically equal to Standard GRPC codes https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
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) 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) ForEach ¶
func (sm StringMap) ForEach(f func(k string, v StringValue))
ForEach iterates over the every elements in the map by calling the provided func.
Example:
it := sm.ForEach(func(k string, v StringValue) { ... })
func (StringMap) Get ¶
func (sm StringMap) Get(k string) (StringValue, bool)
Get returns the StringValue associated with the key and true, otherwise an invalid instance of the StringKeyValue and false. Calling any functions on the returned invalid instance will cause a panic.
func (StringMap) InitEmptyWithCapacity ¶
InitEmptyWithCapacity constructs an empty StringMap with predefined slice capacity.
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 "ForEach" to get access to fewer elements because nil elements are skipped.
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 StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
StringValue stores a string value.
Intended to be passed by value since internally it is just a pointer to actual value representation. For the same reason passing by value and calling setters will modify the original, e.g.:
function f1(val StringValue) { val.SetValue("1234") } function f2() { v := NewStringKeyValue("key", "a string") f1(v) _ := v.Value() // this will return "1234" }
func (StringValue) SetValue ¶
func (akv StringValue) SetValue(v string)
SetValue replaces the value associated with this StringValue. Calling this function on zero-initialized StringValue will cause a panic.
func (StringValue) Value ¶
func (akv StringValue) Value() string
Value returns the value associated with this StringValue. Calling this function on zero-initialized StringValue will cause a panic.
type SummaryDataPoint ¶
type SummaryDataPoint struct {
// contains filtered or unexported fields
}
SummaryDataPoint is a single data point in a timeseries that describes the time-varying values of a Summary metric.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryDataPoint function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPoint ¶
func NewSummaryDataPoint() SummaryDataPoint
NewSummaryDataPoint creates a new "nil" SummaryDataPoint. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (SummaryDataPoint) CopyTo ¶
func (ms SummaryDataPoint) CopyTo(dest SummaryDataPoint)
CopyTo copies all properties from the current struct to the dest.
func (SummaryDataPoint) Count ¶
func (ms SummaryDataPoint) Count() uint64
Count returns the count associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) InitEmpty ¶
func (ms SummaryDataPoint) InitEmpty()
InitEmpty overwrites the current value with empty.
func (SummaryDataPoint) IsNil ¶
func (ms SummaryDataPoint) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (SummaryDataPoint) LabelsMap ¶
func (ms SummaryDataPoint) LabelsMap() StringMap
LabelsMap returns the Labels associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) SetCount ¶
func (ms SummaryDataPoint) SetCount(v uint64)
SetCount replaces the count associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) SetStartTime ¶
func (ms SummaryDataPoint) SetStartTime(v TimestampUnixNano)
SetStartTime replaces the starttime associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) SetSum ¶
func (ms SummaryDataPoint) SetSum(v float64)
SetSum replaces the sum associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) SetTimestamp ¶
func (ms SummaryDataPoint) SetTimestamp(v TimestampUnixNano)
SetTimestamp replaces the timestamp associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) StartTime ¶
func (ms SummaryDataPoint) StartTime() TimestampUnixNano
StartTime returns the starttime associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) Sum ¶
func (ms SummaryDataPoint) Sum() float64
Sum returns the sum associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) Timestamp ¶
func (ms SummaryDataPoint) Timestamp() TimestampUnixNano
Timestamp returns the timestamp associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryDataPoint) ValueAtPercentiles ¶
func (ms SummaryDataPoint) ValueAtPercentiles() SummaryValueAtPercentileSlice
ValueAtPercentiles returns the PercentileValues associated with this SummaryDataPoint.
Important: This causes a runtime error if IsNil() returns "true".
type SummaryDataPointSlice ¶
type SummaryDataPointSlice struct {
// contains filtered or unexported fields
}
SummaryDataPointSlice logically represents a slice of SummaryDataPoint.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryDataPointSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryDataPointSlice ¶
func NewSummaryDataPointSlice() SummaryDataPointSlice
NewSummaryDataPointSlice creates a SummaryDataPointSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SummaryDataPointSlice) 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.
func (SummaryDataPointSlice) At ¶
func (es SummaryDataPointSlice) At(ix int) SummaryDataPoint
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SummaryDataPointSlice) CopyTo ¶
func (es SummaryDataPointSlice) CopyTo(dest SummaryDataPointSlice)
CopyTo copies all elements from the current slice to the dest.
func (SummaryDataPointSlice) Len ¶
func (es SummaryDataPointSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSummaryDataPointSlice()".
func (SummaryDataPointSlice) MoveAndAppendTo ¶
func (es SummaryDataPointSlice) MoveAndAppendTo(dest SummaryDataPointSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SummaryDataPointSlice) Resize ¶
func (es SummaryDataPointSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new SummaryDataPointSlice can be initialized: es := NewSummaryDataPointSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type SummaryValueAtPercentile ¶
type SummaryValueAtPercentile struct {
// contains filtered or unexported fields
}
SummaryValueAtPercentile represents the value at a given percentile of a distribution.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryValueAtPercentile function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryValueAtPercentile ¶
func NewSummaryValueAtPercentile() SummaryValueAtPercentile
NewSummaryValueAtPercentile creates a new "nil" SummaryValueAtPercentile. To initialize the struct call "InitEmpty".
This must be used only in testing code since no "Set" method available.
func (SummaryValueAtPercentile) CopyTo ¶
func (ms SummaryValueAtPercentile) CopyTo(dest SummaryValueAtPercentile)
CopyTo copies all properties from the current struct to the dest.
func (SummaryValueAtPercentile) InitEmpty ¶
func (ms SummaryValueAtPercentile) InitEmpty()
InitEmpty overwrites the current value with empty.
func (SummaryValueAtPercentile) IsNil ¶
func (ms SummaryValueAtPercentile) IsNil() bool
IsNil returns true if the underlying data are nil.
Important: All other functions will cause a runtime error if this returns "true".
func (SummaryValueAtPercentile) Percentile ¶
func (ms SummaryValueAtPercentile) Percentile() float64
Percentile returns the percentile associated with this SummaryValueAtPercentile.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryValueAtPercentile) SetPercentile ¶
func (ms SummaryValueAtPercentile) SetPercentile(v float64)
SetPercentile replaces the percentile associated with this SummaryValueAtPercentile.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryValueAtPercentile) SetValue ¶
func (ms SummaryValueAtPercentile) SetValue(v float64)
SetValue replaces the value associated with this SummaryValueAtPercentile.
Important: This causes a runtime error if IsNil() returns "true".
func (SummaryValueAtPercentile) Value ¶
func (ms SummaryValueAtPercentile) Value() float64
Value returns the value associated with this SummaryValueAtPercentile.
Important: This causes a runtime error if IsNil() returns "true".
type SummaryValueAtPercentileSlice ¶
type SummaryValueAtPercentileSlice struct {
// contains filtered or unexported fields
}
SummaryValueAtPercentileSlice logically represents a slice of SummaryValueAtPercentile.
This is a reference type, if passed by value and callee modifies it the caller will see the modification.
Must use NewSummaryValueAtPercentileSlice function to create new instances. Important: zero-initialized instance is not valid for use.
func NewSummaryValueAtPercentileSlice ¶
func NewSummaryValueAtPercentileSlice() SummaryValueAtPercentileSlice
NewSummaryValueAtPercentileSlice creates a SummaryValueAtPercentileSlice with 0 elements. Can use "Resize" to initialize with a given length.
func (SummaryValueAtPercentileSlice) Append ¶ added in v0.5.0
func (es SummaryValueAtPercentileSlice) Append(e *SummaryValueAtPercentile)
Append will increase the length of the SummaryValueAtPercentileSlice by one and set the given SummaryValueAtPercentile at that new position. The original SummaryValueAtPercentile could still be referenced so do not reuse it after passing it to this method.
func (SummaryValueAtPercentileSlice) At ¶
func (es SummaryValueAtPercentileSlice) At(ix int) SummaryValueAtPercentile
At returns the element at the given index.
This function is used mostly for iterating over all the values in the slice:
for i := 0; i < es.Len(); i++ { e := es.At(i) ... // Do something with the element }
func (SummaryValueAtPercentileSlice) CopyTo ¶
func (es SummaryValueAtPercentileSlice) CopyTo(dest SummaryValueAtPercentileSlice)
CopyTo copies all elements from the current slice to the dest.
func (SummaryValueAtPercentileSlice) Len ¶
func (es SummaryValueAtPercentileSlice) Len() int
Len returns the number of elements in the slice.
Returns "0" for a newly instance created with "NewSummaryValueAtPercentileSlice()".
func (SummaryValueAtPercentileSlice) MoveAndAppendTo ¶
func (es SummaryValueAtPercentileSlice) MoveAndAppendTo(dest SummaryValueAtPercentileSlice)
MoveAndAppendTo moves all elements from the current slice and appends them to the dest. The current slice will be cleared.
func (SummaryValueAtPercentileSlice) Resize ¶
func (es SummaryValueAtPercentileSlice) Resize(newLen int)
Resize is an operation that resizes the slice: 1. If newLen is 0 then the slice is replaced with a nil slice. 2. If the newLen <= len then equivalent with slice[0:newLen]. 3. If the newLen > len then (newLen - len) empty elements will be appended to the slice.
Here is how a new SummaryValueAtPercentileSlice can be initialized: es := NewSummaryValueAtPercentileSlice() es.Resize(4)
for i := 0; i < es.Len(); i++ { e := es.At(i) // Here should set all the values for e. }
type TimestampUnixNano ¶
type TimestampUnixNano uint64
TimestampUnixNano is a time specified as UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
func (TimestampUnixNano) String ¶
func (ts TimestampUnixNano) String() string
type TraceState ¶
type TraceState string
TraceState in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
type Traces ¶
type Traces struct {
// contains filtered or unexported fields
}
Traces is the top-level struct that is propagated through the traces pipeline. This is the newer version of consumerdata.Traces, but uses more efficient in-memory representation.
func TracesFromOtlp ¶
func TracesFromOtlp(orig []*otlptrace.ResourceSpans) Traces
TracesFromOtlp creates the internal Traces representation from the OTLP.
func (Traces) ResourceSpans ¶
func (td Traces) ResourceSpans() ResourceSpansSlice