From 2fed326b4e457a1b830a6a023bcb0dca1d401aea Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:08:22 -0700 Subject: [PATCH] update processor helper tests + stability Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- processor/processorhelper/documentation.md | 2 +- .../processorhelper/internal/metadata/generated_telemetry.go | 2 +- processor/processorhelper/logs_test.go | 4 ++-- processor/processorhelper/metadata.yaml | 2 ++ processor/processorhelper/metrics_test.go | 4 ++-- processor/processorhelper/traces_test.go | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/processor/processorhelper/documentation.md b/processor/processorhelper/documentation.md index df3cb199fc4..1f91fb037cb 100644 --- a/processor/processorhelper/documentation.md +++ b/processor/processorhelper/documentation.md @@ -64,7 +64,7 @@ Number of items passed to the processor. [alpha] ### otelcol_processor_outgoing_items -Number of items emitted from the processor. +Number of items emitted from the processor. [alpha] | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | diff --git a/processor/processorhelper/internal/metadata/generated_telemetry.go b/processor/processorhelper/internal/metadata/generated_telemetry.go index 3f5216daac8..504fade54de 100644 --- a/processor/processorhelper/internal/metadata/generated_telemetry.go +++ b/processor/processorhelper/internal/metadata/generated_telemetry.go @@ -107,7 +107,7 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...Teleme errs = errors.Join(errs, err) builder.ProcessorOutgoingItems, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( "otelcol_processor_outgoing_items", - metric.WithDescription("Number of items emitted from the processor."), + metric.WithDescription("Number of items emitted from the processor. [alpha]"), metric.WithUnit("{items}"), ) errs = errors.Join(errs, err) diff --git a/processor/processorhelper/logs_test.go b/processor/processorhelper/logs_test.go index 676155595e5..0b65813ec79 100644 --- a/processor/processorhelper/logs_test.go +++ b/processor/processorhelper/logs_test.go @@ -97,7 +97,7 @@ func TestLogsProcessor_RecordInOut(t *testing.T) { testTelemetry.assertMetrics(t, []metricdata.Metrics{ { Name: "otelcol_processor_incoming_items", - Description: "Number of items passed to the processor.", + Description: "Number of items passed to the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality, @@ -112,7 +112,7 @@ func TestLogsProcessor_RecordInOut(t *testing.T) { }, { Name: "otelcol_processor_outgoing_items", - Description: "Number of items emitted from the processor.", + Description: "Number of items emitted from the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality, diff --git a/processor/processorhelper/metadata.yaml b/processor/processorhelper/metadata.yaml index 967c11ce713..d6be91a6663 100644 --- a/processor/processorhelper/metadata.yaml +++ b/processor/processorhelper/metadata.yaml @@ -22,6 +22,8 @@ telemetry: processor_outgoing_items: enabled: true + stability: + level: alpha description: Number of items emitted from the processor. unit: "{items}" sum: diff --git a/processor/processorhelper/metrics_test.go b/processor/processorhelper/metrics_test.go index db59e4be030..bdb077d54f6 100644 --- a/processor/processorhelper/metrics_test.go +++ b/processor/processorhelper/metrics_test.go @@ -98,7 +98,7 @@ func TestMetricsProcessor_RecordInOut(t *testing.T) { testTelemetry.assertMetrics(t, []metricdata.Metrics{ { Name: "otelcol_processor_incoming_items", - Description: "Number of items passed to the processor.", + Description: "Number of items passed to the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality, @@ -113,7 +113,7 @@ func TestMetricsProcessor_RecordInOut(t *testing.T) { }, { Name: "otelcol_processor_outgoing_items", - Description: "Number of items emitted from the processor.", + Description: "Number of items emitted from the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality, diff --git a/processor/processorhelper/traces_test.go b/processor/processorhelper/traces_test.go index 1e11564cdfc..ab7c12ca9a0 100644 --- a/processor/processorhelper/traces_test.go +++ b/processor/processorhelper/traces_test.go @@ -98,7 +98,7 @@ func TestTracesProcessor_RecordInOut(t *testing.T) { testTelemetry.assertMetrics(t, []metricdata.Metrics{ { Name: "otelcol_processor_incoming_items", - Description: "Number of items passed to the processor.", + Description: "Number of items passed to the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality, @@ -113,7 +113,7 @@ func TestTracesProcessor_RecordInOut(t *testing.T) { }, { Name: "otelcol_processor_outgoing_items", - Description: "Number of items emitted from the processor.", + Description: "Number of items emitted from the processor. [alpha]", Unit: "{items}", Data: metricdata.Sum[int64]{ Temporality: metricdata.CumulativeTemporality,