# README

Metrics Context

The Metrics Context is a Context implementation for pdata Metrics, the collector's internal representation for OTLP metric data. This Context should be used when interacted with OTLP metrics.

Paths

In general, the Metrics 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 fields are the exception.

pathfield accessedtype
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 processedstring, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
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.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 processedstring, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
attributesattributes of the data point being processedpcommon.Map
attributes[""]the value of the attribute of the data point being processedstring, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
metricthe metric to which the data point being processed belongspmetric.Metric
metric.namethe name of the metric to which the data point being processed belongsstring
metric.descriptionthe description of the metric to which the data point being processed belongsstring
metric.unitthe unit of the metric to which the data point being processed belongsstring
metric.typethe type of the metric to which the data point being processed belongs. See enums below for integer mapping.int64
metric.aggregation_temporalitythe aggregation temporality of the metric to which the data point being processed belongsint64
metric.is_monotonicthe monotonicity of the metric to which the data point being processed belongsbool
positivethe positive buckets of the data point being processedpmetric.ExponentialHistogramDataPoint
positive.offsetthe offset of the positive buckets of the data point being processedint64
positive.bucket_countsthe bucket_counts of the positive buckets of the data point being processeduint64
negativethe negative buckets of the data point being processedpmetric.ExponentialHistogramDataPoint
negative.offsetthe offset of the negative buckets of the data point being processedint64
negative.bucket_countsthe bucket_counts of the negative buckets of the data point being processeduint64

Enums

The Metrics 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
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

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

# Structs

No description provided by the author