From b88838f14cbb1449495997e99cb11441059711dd Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:20:31 -0700 Subject: [PATCH 1/2] [receiver/mysqlreceiver] update scope name for consistency Update the scope name for telemetry produced by the mysqlreceiverreceiver from otelcol/mysqlreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiverreceiver 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-mysqlreceiver.yaml | 27 +++++++++++++++++++ .../internal/metadata/generated_metrics.go | 2 +- receiver/mysqlreceiver/metadata.yaml | 1 - .../testdata/integration/expected.yaml | 2 +- .../testdata/scraper/expected.yaml | 2 +- .../testdata/scraper/expected_partial.yaml | 2 +- 6 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .chloggen/codeboten_update-scope-mysqlreceiver.yaml diff --git a/.chloggen/codeboten_update-scope-mysqlreceiver.yaml b/.chloggen/codeboten_update-scope-mysqlreceiver.yaml new file mode 100644 index 0000000000000..8265da52652f5 --- /dev/null +++ b/.chloggen/codeboten_update-scope-mysqlreceiver.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: mysqlreceiver + +# 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 mysqlreceiver from `otelcol/mysqlreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver`" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34429] + +# (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/mysqlreceiver/internal/metadata/generated_metrics.go b/receiver/mysqlreceiver/internal/metadata/generated_metrics.go index 9c33f4832cf46..d3e8fb206e216 100644 --- a/receiver/mysqlreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mysqlreceiver/internal/metadata/generated_metrics.go @@ -3644,7 +3644,7 @@ func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("otelcol/mysqlreceiver") + ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricMysqlBufferPoolDataPages.emit(ils.Metrics()) diff --git a/receiver/mysqlreceiver/metadata.yaml b/receiver/mysqlreceiver/metadata.yaml index 5ab97e08552aa..9ad7bf97c98a7 100644 --- a/receiver/mysqlreceiver/metadata.yaml +++ b/receiver/mysqlreceiver/metadata.yaml @@ -1,5 +1,4 @@ type: mysql -scope_name: otelcol/mysqlreceiver status: class: receiver diff --git a/receiver/mysqlreceiver/testdata/integration/expected.yaml b/receiver/mysqlreceiver/testdata/integration/expected.yaml index 19df9c7002724..e0cf0804446e2 100644 --- a/receiver/mysqlreceiver/testdata/integration/expected.yaml +++ b/receiver/mysqlreceiver/testdata/integration/expected.yaml @@ -676,5 +676,5 @@ resourceMetrics: isMonotonic: true unit: "s" scope: - name: otelcol/mysqlreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver version: latest diff --git a/receiver/mysqlreceiver/testdata/scraper/expected.yaml b/receiver/mysqlreceiver/testdata/scraper/expected.yaml index 4ec9188ea89bc..681796c10753f 100644 --- a/receiver/mysqlreceiver/testdata/scraper/expected.yaml +++ b/receiver/mysqlreceiver/testdata/scraper/expected.yaml @@ -1743,5 +1743,5 @@ resourceMetrics: isMonotonic: true unit: s scope: - name: otelcol/mysqlreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver version: latest diff --git a/receiver/mysqlreceiver/testdata/scraper/expected_partial.yaml b/receiver/mysqlreceiver/testdata/scraper/expected_partial.yaml index 82bd5d6069f84..a285bb9a4aee4 100644 --- a/receiver/mysqlreceiver/testdata/scraper/expected_partial.yaml +++ b/receiver/mysqlreceiver/testdata/scraper/expected_partial.yaml @@ -20,5 +20,5 @@ resourceMetrics: timeUnixNano: "2000000" unit: "1" scope: - name: otelcol/mysqlreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver version: latest From f8f7c9b77f5e163997f2cfe0710bee8a4021795e Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:43:42 -0700 Subject: [PATCH 2/2] Update .chloggen/codeboten_update-scope-mysqlreceiver.yaml --- .chloggen/codeboten_update-scope-mysqlreceiver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/codeboten_update-scope-mysqlreceiver.yaml b/.chloggen/codeboten_update-scope-mysqlreceiver.yaml index 8265da52652f5..2a8702c999762 100644 --- a/.chloggen/codeboten_update-scope-mysqlreceiver.yaml +++ b/.chloggen/codeboten_update-scope-mysqlreceiver.yaml @@ -10,7 +10,7 @@ component: mysqlreceiver note: "Update the scope name for telemetry produced by the mysqlreceiver from `otelcol/mysqlreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver`" # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. -issues: [34429] +issues: [34545] # (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.