# README

DataPoint Context

[!NOTE] This documentation applies only to version 0.120.0 and later. For information on earlier versions, please refer to the previous documentation.

The DataPoint Context is a Context implementation for pdata DataPoints, the collector's internal representation for OTLP metric data points. This Context should be used when interacting with individual OTLP data points.

Paths

In general, the DataPoint Context supports accessing pdata using the field names from the metrics proto. All integers are returned and set via int64. All doubles are returned and set via float64.

The following paths are supported.

pathfield accessedtype
datapoint.cachethe value of the current transform context's temporary cache. cache can be used as a temporary placeholder for data during complex transformationspcommon.Map
datapoint.cache[""]the value of an item in cache. Supports multiple indexes to access nested fields.string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
resourceresource of the data point being processedpcommon.Resource
resource.attributesresource attributes of the data point being processedpcommon.Map
resource.attributes[""]the value of the resource attribute of the data point being processed. Supports multiple indexes to access nested fields.string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
resource.dropped_attributes_countnumber of dropped attributes of the resource of the data point being processedint64
instrumentation_scopeinstrumentation scope of the data point being processedpcommon.InstrumentationScope
instrumentation_scope.namename of the instrumentation scope of the data point being processedstring
instrumentation_scope.versionversion of the instrumentation scope of the data point being processedstring
instrumentation_scope.dropped_attributes_countnumber of dropped attributes of the instrumentation scope of the data point being processedint64
instrumentation_scope.attributesinstrumentation scope attributes of the data point being processedpcommon.Map
instrumentation_scope.attributes[""]the value of the instrumentation scope attribute of the data point being processed. Supports multiple indexes to access nested fields.string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
datapoint.attributesattributes of the data point being processedpcommon.Map
datapoint.attributes[""]the value of the attribute of the data point being processed. Supports multiple indexes to access nested fields.string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
metricthe metric to which the data point being processed belongspmetric.Metric
metric.*All fields exposed by the ottlmetric context can accessed via metric.varies
datapoint.positivethe positive buckets of the data point being processedpmetric.ExponentialHistogramDataPoint
datapoint.positive.offsetthe offset of the positive buckets of the data point being processedint64
datapoint.positive.bucket_countsthe bucket_counts of the positive buckets of the data point being processeduint64
datapoint.negativethe negative buckets of the data point being processedpmetric.ExponentialHistogramDataPoint
datapoint.negative.offsetthe offset of the negative buckets of the data point being processedint64
datapoint.negative.bucket_countsthe bucket_counts of the negative buckets of the data point being processeduint64
datapoint.start_time_unix_nanothe start time in unix nano of the data point being processedint64
datapoint.timethe time in time.Time of the data point being processedtime.Time
datapoint.start_timethe start time in time.Time of the data point being processedtime.Time
datapoint.time_unix_nanothe time in unix nano of the data point being processedint64
datapoint.value_doublethe double value of the data point being processedfloat64
datapoint.value_intthe int value of the data point being processedint64
datapoint.exemplarsthe exemplars of the data point being processedpmetric.ExemplarSlice
datapoint.flagsthe flags of the data point being processedint64
datapoint.countthe count of the data point being processedint64
datapoint.sumthe sum of the data point being processedfloat64
datapoint.bucket_countsthe bucket counts of the data point being processed[]uint64
datapoint.explicit_boundsthe explicit bounds of the data point being processed[]float64
datapoint.scalethe scale of the data point being processedint64
datapoint.zero_countthe zero_count of the data point being processedint64
datapoint.quantile_valuesthe quantile_values of the data point being processedpmetric.SummaryDataPointValueAtQuantileSlice

Enums

The DataPoint Context supports the enum names from the metrics proto.

In addition, it also supports an enum for metrics data type, with the numeric value being defined by pdata.

Enum SymbolValue
FLAG_NONE0
FLAG_NO_RECORDED_VALUE1
AGGREGATION_TEMPORALITY_UNSPECIFIED0
AGGREGATION_TEMPORALITY_DELTA1
AGGREGATION_TEMPORALITY_CUMULATIVE2
METRIC_DATA_TYPE_NONE0
METRIC_DATA_TYPE_GAUGE1
METRIC_DATA_TYPE_SUM2
METRIC_DATA_TYPE_HISTOGRAM3
METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM4
METRIC_DATA_TYPE_SUMMARY5

# Functions

EnablePathContextNames enables the support to path's context names on statements.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Experimental: *NOTE* this option is subject to change or removal in the future.
No description provided by the author
No description provided by the author

# Constants

Experimental: *NOTE* this constant is subject to change or removal in the future.

# Structs

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author