From 64864ca3554b85fa9589b86a438ff9c56f662c66 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:19:09 -0700 Subject: [PATCH 1/2] [receiver/fluentforwardreceiver] update scope name for consistency Update the scope name for telemetry produced by the fluentforwardreceiverreceiver from otelcol/fluentforwardreceiver to github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiverreceiver 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-fluentforwardreceiver.yaml | 27 +++++++++++++++++++ .../internal/metadata/generated_telemetry.go | 4 +-- .../metadata/generated_telemetry_test.go | 4 +-- receiver/fluentforwardreceiver/metadata.yaml | 1 - 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .chloggen/codeboten_update-scope-fluentforwardreceiver.yaml diff --git a/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml b/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml new file mode 100644 index 000000000000..fae2d573fa76 --- /dev/null +++ b/.chloggen/codeboten_update-scope-fluentforwardreceiver.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: fluentforwardreceiver + +# 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 fluentforwardreceiver from `otelcol/fluentforwardreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver`" + +# 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/fluentforwardreceiver/internal/metadata/generated_telemetry.go b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go index b05544c9f6ca..7c0c1f44f4b0 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go @@ -14,11 +14,11 @@ import ( ) func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("otelcol/fluentforwardreceiver") + return settings.MeterProvider.Meter("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver") } func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("otelcol/fluentforwardreceiver") + return settings.TracerProvider.Tracer("github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver") } // TelemetryBuilder provides an interface for components to report telemetry diff --git a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go index f29f97cf95bf..7db57a5ba09b 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go @@ -49,14 +49,14 @@ func TestProviders(t *testing.T) { meter := Meter(set) if m, ok := meter.(mockMeter); ok { - require.Equal(t, "otelcol/fluentforwardreceiver", m.name) + require.Equal(t, "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver", m.name) } else { require.Fail(t, "returned Meter not mockMeter") } tracer := Tracer(set) if m, ok := tracer.(mockTracer); ok { - require.Equal(t, "otelcol/fluentforwardreceiver", m.name) + require.Equal(t, "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver", m.name) } else { require.Fail(t, "returned Meter not mockTracer") } diff --git a/receiver/fluentforwardreceiver/metadata.yaml b/receiver/fluentforwardreceiver/metadata.yaml index 74e5ec10145d..c3d55238c015 100644 --- a/receiver/fluentforwardreceiver/metadata.yaml +++ b/receiver/fluentforwardreceiver/metadata.yaml @@ -1,5 +1,4 @@ type: fluentforward -scope_name: otelcol/fluentforwardreceiver status: class: receiver From 1a31122dd2408e0e693760af1494453d597cf3ea Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:25:55 -0700 Subject: [PATCH 2/2] Update .chloggen/codeboten_update-scope-fluentforwardreceiver.yaml --- .chloggen/codeboten_update-scope-fluentforwardreceiver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml b/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml index fae2d573fa76..5c02931d5178 100644 --- a/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml +++ b/.chloggen/codeboten_update-scope-fluentforwardreceiver.yaml @@ -10,7 +10,7 @@ component: fluentforwardreceiver note: "Update the scope name for telemetry produced by the fluentforwardreceiver from `otelcol/fluentforwardreceiver` to `github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver`" # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. -issues: [34429] +issues: [34534] # (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.