From 08f15c25b3a6f1a2d63539e400a6f7ece017ae42 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:39:23 -0700 Subject: [PATCH] [receiver/elasticsearchreceiver] update scope name for consistency (#34529) Update the scope name for telemetry produced by the elasticsearchreceiverreceiver from otelcol/elasticsearchreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiverreceiver Part of https://github.com/open-telemetry/opentelemetry-collector/issues/9494 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- ...en_update-scope-elasticsearchreceiver.yaml | 27 +++++++++++++++++++ .../internal/metadata/generated_metrics.go | 2 +- receiver/elasticsearchreceiver/metadata.yaml | 1 - .../expected_metrics/clusterSkip.yaml | 6 ++--- .../testdata/expected_metrics/full_linux.yaml | 8 +++--- .../testdata/expected_metrics/full_other.yaml | 8 +++--- .../testdata/expected_metrics/noNodes.yaml | 6 ++--- .../testdata/integration/expected.7_16_3.yaml | 8 +++--- .../testdata/integration/expected.7_9_3.yaml | 6 ++--- 9 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 .chloggen/codeboten_update-scope-elasticsearchreceiver.yaml diff --git a/.chloggen/codeboten_update-scope-elasticsearchreceiver.yaml b/.chloggen/codeboten_update-scope-elasticsearchreceiver.yaml new file mode 100644 index 000000000000..6208da4d2d55 --- /dev/null +++ b/.chloggen/codeboten_update-scope-elasticsearchreceiver.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: elasticsearchreceiver + +# 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 elasticsearchreceiver from `otelcol/elasticsearchreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver`" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34529] + +# (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/elasticsearchreceiver/internal/metadata/generated_metrics.go b/receiver/elasticsearchreceiver/internal/metadata/generated_metrics.go index c43a76e53e77..170e28e1657d 100644 --- a/receiver/elasticsearchreceiver/internal/metadata/generated_metrics.go +++ b/receiver/elasticsearchreceiver/internal/metadata/generated_metrics.go @@ -5592,7 +5592,7 @@ func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { rm := pmetric.NewResourceMetrics() ils := rm.ScopeMetrics().AppendEmpty() - ils.Scope().SetName("otelcol/elasticsearchreceiver") + ils.Scope().SetName("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver") ils.Scope().SetVersion(mb.buildInfo.Version) ils.Metrics().EnsureCapacity(mb.metricsCapacity) mb.metricElasticsearchBreakerMemoryEstimated.emit(ils.Metrics()) diff --git a/receiver/elasticsearchreceiver/metadata.yaml b/receiver/elasticsearchreceiver/metadata.yaml index 078b413a5d39..9baa109226ba 100644 --- a/receiver/elasticsearchreceiver/metadata.yaml +++ b/receiver/elasticsearchreceiver/metadata.yaml @@ -1,5 +1,4 @@ type: elasticsearch -scope_name: otelcol/elasticsearchreceiver status: class: receiver diff --git a/receiver/elasticsearchreceiver/testdata/expected_metrics/clusterSkip.yaml b/receiver/elasticsearchreceiver/testdata/expected_metrics/clusterSkip.yaml index da3abfa12e4e..e284abc572d9 100644 --- a/receiver/elasticsearchreceiver/testdata/expected_metrics/clusterSkip.yaml +++ b/receiver/elasticsearchreceiver/testdata/expected_metrics/clusterSkip.yaml @@ -535,7 +535,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -1073,7 +1073,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -2295,5 +2295,5 @@ resourceMetrics: name: jvm.threads.count unit: "1" scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest diff --git a/receiver/elasticsearchreceiver/testdata/expected_metrics/full_linux.yaml b/receiver/elasticsearchreceiver/testdata/expected_metrics/full_linux.yaml index 8808a30e6802..3e41ca8608bd 100644 --- a/receiver/elasticsearchreceiver/testdata/expected_metrics/full_linux.yaml +++ b/receiver/elasticsearchreceiver/testdata/expected_metrics/full_linux.yaml @@ -147,7 +147,7 @@ resourceMetrics: name: jvm.memory.heap.used unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -939,7 +939,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -1731,7 +1731,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -3085,5 +3085,5 @@ resourceMetrics: name: jvm.threads.count unit: "1" scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest diff --git a/receiver/elasticsearchreceiver/testdata/expected_metrics/full_other.yaml b/receiver/elasticsearchreceiver/testdata/expected_metrics/full_other.yaml index 6744af363336..0734404bc2f1 100644 --- a/receiver/elasticsearchreceiver/testdata/expected_metrics/full_other.yaml +++ b/receiver/elasticsearchreceiver/testdata/expected_metrics/full_other.yaml @@ -147,7 +147,7 @@ resourceMetrics: name: jvm.memory.heap.used unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -939,7 +939,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -1731,7 +1731,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -3067,5 +3067,5 @@ resourceMetrics: name: jvm.threads.count unit: "1" scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest diff --git a/receiver/elasticsearchreceiver/testdata/expected_metrics/noNodes.yaml b/receiver/elasticsearchreceiver/testdata/expected_metrics/noNodes.yaml index 72bf9a5119cc..fe3988fdeb84 100644 --- a/receiver/elasticsearchreceiver/testdata/expected_metrics/noNodes.yaml +++ b/receiver/elasticsearchreceiver/testdata/expected_metrics/noNodes.yaml @@ -118,7 +118,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: '{shards}' scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -656,7 +656,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -1194,5 +1194,5 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest diff --git a/receiver/elasticsearchreceiver/testdata/integration/expected.7_16_3.yaml b/receiver/elasticsearchreceiver/testdata/integration/expected.7_16_3.yaml index 52d23969f4af..75d45a1b4627 100644 --- a/receiver/elasticsearchreceiver/testdata/integration/expected.7_16_3.yaml +++ b/receiver/elasticsearchreceiver/testdata/integration/expected.7_16_3.yaml @@ -126,7 +126,7 @@ resourceMetrics: name: jvm.memory.heap.used unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -664,7 +664,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -1202,7 +1202,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -3996,5 +3996,5 @@ resourceMetrics: name: jvm.threads.count unit: "1" scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest diff --git a/receiver/elasticsearchreceiver/testdata/integration/expected.7_9_3.yaml b/receiver/elasticsearchreceiver/testdata/integration/expected.7_9_3.yaml index 11291861ffaf..5de42ef2a5ef 100644 --- a/receiver/elasticsearchreceiver/testdata/integration/expected.7_9_3.yaml +++ b/receiver/elasticsearchreceiver/testdata/integration/expected.7_9_3.yaml @@ -126,7 +126,7 @@ resourceMetrics: name: jvm.memory.heap.used unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -664,7 +664,7 @@ resourceMetrics: timeUnixNano: "2000000" unit: By scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest - resource: attributes: @@ -2775,5 +2775,5 @@ resourceMetrics: name: jvm.threads.count unit: "1" scope: - name: otelcol/elasticsearchreceiver + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver version: latest