From def05cbc32d6aaf17589b8c27f0a8f58f0a6907d Mon Sep 17 00:00:00 2001 From: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com> Date: Wed, 2 Oct 2024 01:54:59 +0530 Subject: [PATCH] [chore]: deprecate and remove BuildProcessorMetricName (#11328) This helper is no longer needed since introduction of `mdatagen`. Relates https://github.com/open-telemetry/opentelemetry-collector/issues/11302 --------- Co-authored-by: Bogdan Drutu --- .../deprecate-buildprocessormetricname.yaml | 25 +++++++++++++++++++ processor/processorhelper/obsreport.go | 4 +-- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .chloggen/deprecate-buildprocessormetricname.yaml diff --git a/.chloggen/deprecate-buildprocessormetricname.yaml b/.chloggen/deprecate-buildprocessormetricname.yaml new file mode 100644 index 00000000000..eecce6146dd --- /dev/null +++ b/.chloggen/deprecate-buildprocessormetricname.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: processorhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Deprecate BuildProcessorMetricName as it's no longer needed since introduction of mdatagen + +# One or more tracking issues or pull requests related to the change +issues: [11302] + +# (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: + +# 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/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index 84f3f21d6a7..fd95f51fb9d 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -17,9 +17,7 @@ import ( "go.opentelemetry.io/collector/processor/processorhelper/internal/metadata" ) -// BuildCustomMetricName is used to be build a metric name following -// the standards used in the Collector. The configType should be the same -// value used to identify the type on the config. +// Deprecated: [v0.111.0] no longer needed. To be removed in future. func BuildCustomMetricName(configType, metric string) string { componentPrefix := internal.ProcessorMetricPrefix if !strings.HasSuffix(componentPrefix, internal.MetricNameSep) {