From 160f4cc28e7150a62be357fb3196a15792c5e4a8 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:11:34 -0700 Subject: [PATCH] [receiver/riakreceiver] update scope name for consistency (#34469) Update the scope name for telemetry produced by the riakreceiverreceiver from otelcol/riakreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiverreceiver Part of https://github.com/open-telemetry/opentelemetry-collector/issues/9494 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .../codeboten_update-scope-riakreceiver.yaml | 27 +++++++++++++++++++ .../internal/metadata/generated_metrics.go | 2 +- receiver/riakreceiver/metadata.yaml | 1 - .../testdata/scraper/expected.yaml | 2 +- .../testdata/scraper/expected_disabled.yaml | 2 +- 5 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .chloggen/codeboten_update-scope-riakreceiver.yaml diff --git a/.chloggen/codeboten_update-scope-riakreceiver.yaml b/.chloggen/codeboten_update-scope-riakreceiver.yaml new file mode 100644 index 000000000000..c268e7bd06bf --- /dev/null +++ b/.chloggen/codeboten_update-scope-riakreceiver.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: riakreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update the scope name for telemetry produced by the riakreceiver from otelcol/riakreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34469] + +# (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: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# 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/riakreceiver/internal/metadata/generated_metrics.go b/receiver/riakreceiver/internal/metadata/generated_metrics.go index 0f90d7885246..0fab0444a72d 100644 --- a/receiver/riakreceiver/internal/metadata/generated_metrics.go +++ b/receiver/riakreceiver/internal/metadata/generated_metrics.go @@ -487,7 +487,7 @@ func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("otelcol/riakreceiver") + ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricRiakMemoryLimit.emit(ils.Metrics()) diff --git a/receiver/riakreceiver/metadata.yaml b/receiver/riakreceiver/metadata.yaml index 0fd18d89f9d3..39e6d6772ea3 100644 --- a/receiver/riakreceiver/metadata.yaml +++ b/receiver/riakreceiver/metadata.yaml @@ -1,5 +1,4 @@ type: riak -scope_name: otelcol/riakreceiver status: class: receiver diff --git a/receiver/riakreceiver/testdata/scraper/expected.yaml b/receiver/riakreceiver/testdata/scraper/expected.yaml index df2eff991ead..413dd10f3965 100644 --- a/receiver/riakreceiver/testdata/scraper/expected.yaml +++ b/receiver/riakreceiver/testdata/scraper/expected.yaml @@ -114,5 +114,5 @@ resourceMetrics: isMonotonic: true unit: '{operation}' scope: - name: otelcol/riakreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver version: latest diff --git a/receiver/riakreceiver/testdata/scraper/expected_disabled.yaml b/receiver/riakreceiver/testdata/scraper/expected_disabled.yaml index 4bf3ad6bf0a6..62665b55583c 100644 --- a/receiver/riakreceiver/testdata/scraper/expected_disabled.yaml +++ b/receiver/riakreceiver/testdata/scraper/expected_disabled.yaml @@ -84,5 +84,5 @@ resourceMetrics: isMonotonic: true unit: '{operation}' scope: - name: otelcol/riakreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver version: latest