diff --git a/.chloggen/groupbytraceprocessor-checkapi-26304.yaml b/.chloggen/groupbytraceprocessor-checkapi-26304.yaml new file mode 100755 index 000000000000..d8b76e079ffc --- /dev/null +++ b/.chloggen/groupbytraceprocessor-checkapi-26304.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: groupbytraceprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Do not export the function `MetricViews` and pass checkapi. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [26304] + +# (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: [api] \ No newline at end of file diff --git a/cmd/checkapi/allowlist.txt b/cmd/checkapi/allowlist.txt index 158a8bf1a1cc..7160813ce952 100644 --- a/cmd/checkapi/allowlist.txt +++ b/cmd/checkapi/allowlist.txt @@ -9,7 +9,6 @@ exporter/sentryexporter exporter/sumologicexporter extension/observer/ecsobserver extension/observer -processor/groupbytraceprocessor processor/servicegraphprocessor receiver/carbonreceiver receiver/collectdreceiver diff --git a/processor/groupbytraceprocessor/event_test.go b/processor/groupbytraceprocessor/event_test.go index ce6905da6b0b..bc6635d4d4e0 100644 --- a/processor/groupbytraceprocessor/event_test.go +++ b/processor/groupbytraceprocessor/event_test.go @@ -413,7 +413,7 @@ func TestEventShutdown(t *testing.T) { func TestPeriodicMetrics(t *testing.T) { // prepare - views := MetricViews() + views := metricViews() // ensure that we are starting with a clean state view.Unregister(views...) diff --git a/processor/groupbytraceprocessor/factory.go b/processor/groupbytraceprocessor/factory.go index 281ba8ac6f04..d474d91350f7 100644 --- a/processor/groupbytraceprocessor/factory.go +++ b/processor/groupbytraceprocessor/factory.go @@ -32,7 +32,7 @@ var ( // NewFactory returns a new factory for the Filter processor. func NewFactory() processor.Factory { // TODO: find a more appropriate way to get this done, as we are swallowing the error here - _ = view.Register(MetricViews()...) + _ = view.Register(metricViews()...) return processor.NewFactory( metadata.Type, diff --git a/processor/groupbytraceprocessor/metrics.go b/processor/groupbytraceprocessor/metrics.go index e037d11c1e0f..52584db63e5e 100644 --- a/processor/groupbytraceprocessor/metrics.go +++ b/processor/groupbytraceprocessor/metrics.go @@ -23,8 +23,8 @@ var ( mEventLatency = stats.Int64("processor_groupbytrace_event_latency", "How long the queue events are taking to be processed", stats.UnitMilliseconds) ) -// MetricViews return the metrics views according to given telemetry level. -func MetricViews() []*view.View { +// metricViews return the metrics views according to given telemetry level. +func metricViews() []*view.View { return []*view.View{ { Name: processorhelper.BuildCustomMetricName(string(metadata.Type), mNumTracesConf.Name()), diff --git a/processor/groupbytraceprocessor/metrics_test.go b/processor/groupbytraceprocessor/metrics_test.go index e274ab62b537..c6fdd71004f9 100644 --- a/processor/groupbytraceprocessor/metrics_test.go +++ b/processor/groupbytraceprocessor/metrics_test.go @@ -21,7 +21,7 @@ func TestProcessorMetrics(t *testing.T) { "processor/groupbytrace/processor_groupbytrace_event_latency", } - views := MetricViews() + views := metricViews() for i, viewName := range expectedViewNames { assert.Equal(t, viewName, views[i].Name) }