From 7b040c8fb2af3c0159ffe9c9d49f4d1a80849895 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:40:02 -0700 Subject: [PATCH] [receiver/iisreceiver] update scope name for consistency (#34535) Update the scope name for telemetry produced by the iisreceiverreceiver from otelcol/iisreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiverreceiver 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-iisreceiver.yaml | 27 +++++++++++++++++++ .../internal/metadata/generated_metrics.go | 2 +- receiver/iisreceiver/metadata.yaml | 1 - .../testdata/integration/expected.yaml | 8 +++--- .../testdata/scraper/expected.yaml | 6 ++--- .../expected_negative_denominator.yaml | 2 +- 6 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 .chloggen/codeboten_update-scope-iisreceiver.yaml diff --git a/.chloggen/codeboten_update-scope-iisreceiver.yaml b/.chloggen/codeboten_update-scope-iisreceiver.yaml new file mode 100644 index 000000000000..78ea67a905ee --- /dev/null +++ b/.chloggen/codeboten_update-scope-iisreceiver.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: iisreceiver + +# 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 iisreceiver from `otelcol/iisreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver`" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34535] + +# (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/iisreceiver/internal/metadata/generated_metrics.go b/receiver/iisreceiver/internal/metadata/generated_metrics.go index 1b631f2f5fc5..9f6abd18a827 100644 --- a/receiver/iisreceiver/internal/metadata/generated_metrics.go +++ b/receiver/iisreceiver/internal/metadata/generated_metrics.go @@ -823,7 +823,7 @@ func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("otelcol/iisreceiver") + ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricIisConnectionActive.emit(ils.Metrics()) diff --git a/receiver/iisreceiver/metadata.yaml b/receiver/iisreceiver/metadata.yaml index 1d2ae9c30351..da176006e159 100644 --- a/receiver/iisreceiver/metadata.yaml +++ b/receiver/iisreceiver/metadata.yaml @@ -1,5 +1,4 @@ type: iis -scope_name: otelcol/iisreceiver status: class: receiver diff --git a/receiver/iisreceiver/testdata/integration/expected.yaml b/receiver/iisreceiver/testdata/integration/expected.yaml index 6a01eae6ffc0..a331de0bce59 100644 --- a/receiver/iisreceiver/testdata/integration/expected.yaml +++ b/receiver/iisreceiver/testdata/integration/expected.yaml @@ -152,7 +152,7 @@ resourceMetrics: name: iis.uptime unit: s scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest - resource: attributes: @@ -189,7 +189,7 @@ resourceMetrics: isMonotonic: true unit: "{requests}" scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest - resource: attributes: @@ -226,7 +226,7 @@ resourceMetrics: isMonotonic: true unit: "{requests}" scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest - resource: {} scopeMetrics: @@ -241,5 +241,5 @@ resourceMetrics: timeUnixNano: "1664375533465547100" unit: "{threads}" scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest diff --git a/receiver/iisreceiver/testdata/scraper/expected.yaml b/receiver/iisreceiver/testdata/scraper/expected.yaml index 2c3ab6daf43e..910b7d7fc606 100644 --- a/receiver/iisreceiver/testdata/scraper/expected.yaml +++ b/receiver/iisreceiver/testdata/scraper/expected.yaml @@ -152,7 +152,7 @@ resourceMetrics: name: iis.uptime unit: s scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest - resource: attributes: @@ -189,7 +189,7 @@ resourceMetrics: isMonotonic: true unit: '{requests}' scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest - resource: {} scopeMetrics: @@ -204,5 +204,5 @@ resourceMetrics: timeUnixNano: "1664375532831495700" unit: '{threads}' scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest diff --git a/receiver/iisreceiver/testdata/scraper/expected_negative_denominator.yaml b/receiver/iisreceiver/testdata/scraper/expected_negative_denominator.yaml index ba12e5fa2a30..c319c1d88edc 100644 --- a/receiver/iisreceiver/testdata/scraper/expected_negative_denominator.yaml +++ b/receiver/iisreceiver/testdata/scraper/expected_negative_denominator.yaml @@ -15,5 +15,5 @@ resourceMetrics: name: iis.request.queue.age.max unit: ms scope: - name: otelcol/iisreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver version: latest