Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeKeyValue ¶
type CollectorInstanceInfo ¶
type CollectorInstanceInfo struct {
// contains filtered or unexported fields
}
CollectorInstanceInfo holds the attributes that could uniquely identify the current collector instance. These attributes are initialized from the telemetry settings. The CollectorInstanceInfo can copy these attributes, with a given prefix, to a provided map.
func NewCollectorInstanceInfo ¶
func NewCollectorInstanceInfo( set component.TelemetrySettings, ) *CollectorInstanceInfo
func (CollectorInstanceInfo) Copy ¶
func (info CollectorInstanceInfo) Copy(to pcommon.Map)
func (CollectorInstanceInfo) Size ¶
func (info CollectorInstanceInfo) Size() int
Size returns the max number of attributes that defines a collector's instance information. Can be used to presize the attributes.
type ExplicitHistogram ¶
type ExponentialHistogram ¶
type MetricDef ¶
type MetricDef[K any] struct { Key MetricKey Unit string IncludeResourceAttributes []AttributeKeyValue Attributes []AttributeKeyValue Conditions *ottl.ConditionSequence[K] ExponentialHistogram *ExponentialHistogram[K] ExplicitHistogram *ExplicitHistogram[K] Sum *Sum[K] }
func (*MetricDef[K]) FilterAttributes ¶
FilterAttributes filters event attributes (datapoint, logrecord, spans) based on the `Attributes` selected for the metric definition. If no attributes are selected then an empty `pcommon.Map` is returned. Note that, this filtering differs from resource attribute filtering as in attribute filtering if any of the configured attributes is not present in the data being processed then that metric definition is not processed. The method returns a bool signaling if the filter was successful and metric should be processed. If the bool value is false then the returned map should not be used.
func (*MetricDef[K]) FilterResourceAttributes ¶
func (md *MetricDef[K]) FilterResourceAttributes( attrs pcommon.Map, collectorInfo *CollectorInstanceInfo, ) pcommon.Map
FilterResourceAttributes filters resource attributes based on the `IncludeResourceAttributes` list for the metric definition. Resource attributes are only filtered if the list is specified, otherwise all the resource attributes are used for creating the metrics from the metric definition.
func (*MetricDef[K]) FromMetricInfo ¶
func (md *MetricDef[K]) FromMetricInfo( mi config.MetricInfo, parser ottl.Parser[K], telemetrySettings component.TelemetrySettings, ) error