Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveDataPointsWithContextIf ¶ added in v0.115.0
func MoveDataPointsWithContextIf(from, to pmetric.Metrics, f func(pmetric.ResourceMetrics, pmetric.ScopeMetrics, pmetric.Metric, any) bool)
MoveDataPointsWithContextIf calls f sequentially for each DataPoint present in the first pmetric.Metrics. If f returns true, the element is removed from the first pmetric.Metrics and added to the second pmetric.Metrics. Notably, the Resource, Scope, and Metric associated with the DataPoint are created in the second pmetric.Metrics only once. Resources, Scopes, or Metrics are removed from the original if they become empty. All ordering is preserved.
func MoveMetricsWithContextIf ¶ added in v0.114.0
func MoveMetricsWithContextIf(from, to pmetric.Metrics, f func(pmetric.ResourceMetrics, pmetric.ScopeMetrics, pmetric.Metric) bool)
MoveMetricsWithContextIf calls f sequentially for each Metric present in the first pmetric.Metrics. If f returns true, the element is removed from the first pmetric.Metrics and added to the second pmetric.Metrics. Notably, the Resource and Scope associated with the Metric are created in the second pmetric.Metrics only once. Resources or Scopes are removed from the original if they become empty. All ordering is preserved.
func MoveResourcesIf ¶
func MoveResourcesIf(from, to pmetric.Metrics, f func(pmetric.ResourceMetrics) bool)
MoveResourcesIf calls f sequentially for each ResourceSpans present in the first pmetric.Metrics. If f returns true, the element is removed from the first pmetric.Metrics and added to the second pmetric.Metrics.
Types ¶
This section is empty.