From dee8e2d97ff385857e4877bbc2e284cec8b83b7e Mon Sep 17 00:00:00 2001 From: Przemek Maciolek Date: Mon, 9 Nov 2020 17:37:18 +0100 Subject: [PATCH] Expose tailsamplingprocessor metrics --- processor/tailsamplingprocessor/metrics.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/processor/tailsamplingprocessor/metrics.go b/processor/tailsamplingprocessor/metrics.go index c2e44239e344..80e0dbd02449 100644 --- a/processor/tailsamplingprocessor/metrics.go +++ b/processor/tailsamplingprocessor/metrics.go @@ -45,6 +45,11 @@ var ( statTracesOnMemoryGauge = stats.Int64("sampling_traces_on_memory", "Tracks the number of traces current on memory", stats.UnitDimensionless) ) +func init() { + // TODO: this is hardcoding the metrics level and skips error handling + _ = view.Register(SamplingProcessorMetricViews(configtelemetry.LevelNormal)...) +} + // SamplingProcessorMetricViews return the metrics views according to given telemetry level. func SamplingProcessorMetricViews(level configtelemetry.Level) []*view.View { if level == configtelemetry.LevelNone {