diff --git a/.chloggen/receiverhelper_metric_units.yaml b/.chloggen/receiverhelper_metric_units.yaml new file mode 100644 index 00000000000..3f06210459e --- /dev/null +++ b/.chloggen/receiverhelper_metric_units.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: receiverhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update units for internal telemetry + +# One or more tracking issues or pull requests related to the change +issues: [10650] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/receiver/receiverhelper/documentation.md b/receiver/receiverhelper/documentation.md index d3990dfe998..55e8657e6e0 100644 --- a/receiver/receiverhelper/documentation.md +++ b/receiver/receiverhelper/documentation.md @@ -12,7 +12,7 @@ Number of log records successfully pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {records} | Sum | Int | true | ### otelcol_receiver_accepted_metric_points @@ -20,7 +20,7 @@ Number of metric points successfully pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {datapoints} | Sum | Int | true | ### otelcol_receiver_accepted_spans @@ -28,7 +28,7 @@ Number of spans successfully pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {spans} | Sum | Int | true | ### otelcol_receiver_refused_log_records @@ -36,7 +36,7 @@ Number of log records that could not be pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {records} | Sum | Int | true | ### otelcol_receiver_refused_metric_points @@ -44,7 +44,7 @@ Number of metric points that could not be pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {datapoints} | Sum | Int | true | ### otelcol_receiver_refused_spans @@ -52,4 +52,4 @@ Number of spans that could not be pushed into the pipeline. | Unit | Metric Type | Value Type | Monotonic | | ---- | ----------- | ---------- | --------- | -| 1 | Sum | Int | true | +| {spans} | Sum | Int | true | diff --git a/receiver/receiverhelper/internal/metadata/generated_telemetry.go b/receiver/receiverhelper/internal/metadata/generated_telemetry.go index bb2ed6c7d1b..8e0b5a8455a 100644 --- a/receiver/receiverhelper/internal/metadata/generated_telemetry.go +++ b/receiver/receiverhelper/internal/metadata/generated_telemetry.go @@ -60,37 +60,37 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme builder.ReceiverAcceptedLogRecords, err = builder.meter.Int64Counter( "otelcol_receiver_accepted_log_records", metric.WithDescription("Number of log records successfully pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{records}"), ) errs = errors.Join(errs, err) builder.ReceiverAcceptedMetricPoints, err = builder.meter.Int64Counter( "otelcol_receiver_accepted_metric_points", metric.WithDescription("Number of metric points successfully pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{datapoints}"), ) errs = errors.Join(errs, err) builder.ReceiverAcceptedSpans, err = builder.meter.Int64Counter( "otelcol_receiver_accepted_spans", metric.WithDescription("Number of spans successfully pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{spans}"), ) errs = errors.Join(errs, err) builder.ReceiverRefusedLogRecords, err = builder.meter.Int64Counter( "otelcol_receiver_refused_log_records", metric.WithDescription("Number of log records that could not be pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{records}"), ) errs = errors.Join(errs, err) builder.ReceiverRefusedMetricPoints, err = builder.meter.Int64Counter( "otelcol_receiver_refused_metric_points", metric.WithDescription("Number of metric points that could not be pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{datapoints}"), ) errs = errors.Join(errs, err) builder.ReceiverRefusedSpans, err = builder.meter.Int64Counter( "otelcol_receiver_refused_spans", metric.WithDescription("Number of spans that could not be pushed into the pipeline."), - metric.WithUnit("1"), + metric.WithUnit("{spans}"), ) errs = errors.Join(errs, err) return &builder, errs diff --git a/receiver/receiverhelper/metadata.yaml b/receiver/receiverhelper/metadata.yaml index db8dec36922..373b6838262 100644 --- a/receiver/receiverhelper/metadata.yaml +++ b/receiver/receiverhelper/metadata.yaml @@ -12,7 +12,7 @@ telemetry: receiver_accepted_spans: enabled: true description: Number of spans successfully pushed into the pipeline. - unit: "1" + unit: "{spans}" sum: value_type: int monotonic: true @@ -20,7 +20,7 @@ telemetry: receiver_refused_spans: enabled: true description: Number of spans that could not be pushed into the pipeline. - unit: "1" + unit: "{spans}" sum: value_type: int monotonic: true @@ -28,7 +28,7 @@ telemetry: receiver_accepted_metric_points: enabled: true description: Number of metric points successfully pushed into the pipeline. - unit: "1" + unit: "{datapoints}" sum: value_type: int monotonic: true @@ -36,7 +36,7 @@ telemetry: receiver_refused_metric_points: enabled: true description: Number of metric points that could not be pushed into the pipeline. - unit: "1" + unit: "{datapoints}" sum: value_type: int monotonic: true @@ -44,7 +44,7 @@ telemetry: receiver_accepted_log_records: enabled: true description: Number of log records successfully pushed into the pipeline. - unit: "1" + unit: "{records}" sum: value_type: int monotonic: true @@ -52,7 +52,7 @@ telemetry: receiver_refused_log_records: enabled: true description: Number of log records that could not be pushed into the pipeline. - unit: "1" + unit: "{records}" sum: value_type: int monotonic: true \ No newline at end of file