Skip to content

feat(collector): promote operator.collector.usedefaulttelemetryshape gate to beta - #5204

Merged
swiatekm merged 3 commits into
open-telemetry:mainfrom
nikhilmantri0902:feat/5075-promote-telemetry-shape-beta
Jun 11, 2026
Merged

swiatekm merged 3 commits into
open-telemetry:mainfrom
nikhilmantri0902:feat/5075-promote-telemetry-shape-beta

Conversation

@nikhilmantri0902

Copy link
Copy Markdown
Contributor

Description: Promotes the operator.collector.usedefaulttelemetryshape feature gate from Alpha to Beta. Beta gates default ON, so the operator-injected Prometheus telemetry reader now uses collector
defaults — metric names from operator-managed collectors no longer carry type suffixes, units, or scope_info.

AddPrometheusMetricsEndpoint retains the gate check so users who need the pre-v0.152.0 metric name shape can opt out via --feature-gates=-operator.collector.usedefaulttelemetryshape, or pin
without_type_suffix/without_units/without_scope_info to false explicitly under spec.config.service.telemetry. The gate will be promoted to Stable and removed in a future release.

This is the next step in the SIG plan from 2026-05-05 tracked in #5075.

Link to tracking Issue(s): #5075

Testing:

  • Updated internal/otelconfig/config_test.go:
    • Renamed the gate-toggle tests to TestAddPrometheusMetricsEndpointUsesCollectorDefaultsByDefault (no toggle, default behavior) and TestAddPrometheusMetricsEndpointPreservesShapeWhenGateDisabled
      (explicitly disables the gate via a new withTelemetryShapeGate helper).
    • Adjusted TestTelemetryLogsPreservedWithMetrics and TestTelemetryIncompleteConfigAppliesDefaults to expect the 3 fields to be absent under the new default.
  • Updated internal/webhook/collector_webhook_test.go (TestCollectorDefaultingWebhook) and pkg/collector/upgrade/v0_122_0_test.go (TestUpgrade0_122_0/should_remove_address_field_from_metrics_config)
    to drop the 3 fields from their expected configs.
  • Updated 14 e2e assert YAMLs (tests/e2e/*, tests/e2e-targetallocator*, tests/e2e-ta-collector-mtls, tests/e2e-openshift/must-gather) to drop the 3 without_*: false lines.
  • Recomputed the 3 hash-suffixed ConfigMap names in tests/e2e/versioned-configmaps/{00,01}-assert.yaml and tests/e2e-openshift/must-gather/assert-install-target-allocator.yaml for the new rendered config
    bytes.

Verified locally: go test ./... (45 packages, 0 failures) and ./bin/chainsaw test --test-dir ./tests/e2e/versioned-configmapsPASS.

Documentation: Added a changelog entry at .chloggen/feat_5075-promote-telemetry-shape-beta.yaml (enhancement, collector). The feature-gate's WithRegisterDescription and the comment on
AddPrometheusMetricsEndpoint have been updated to reflect the new default.

@nikhilmantri0902
nikhilmantri0902 requested a review from a team as a code owner June 10, 2026 16:00
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

❌ 18 Tests Failed:

Tests completed Failed Passed Skipped
101 18 83 2
View the top 3 failed test(s) by shortest run time
::instrumentation-nginx-multicontainer
Stack Traces | 378s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-python
Stack Traces | 386s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-python-oldest
Stack Traces | 389s run time
($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-apache-multicontainer
Stack Traces | 389s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-dotnet-multicontainer
Stack Traces | 397s run time
($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-dotnet
Stack Traces | 397s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-apache-httpd
Stack Traces | 407s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-nginx-contnr-secctx
Stack Traces | 410s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-nginx
Stack Traces | 411s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `0`): Invalid value: null: Expected value: true
::instrumentation-java-other-ns
Stack Traces | 426s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-python-musl
Stack Traces | 427s run time
($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-java
Stack Traces | 427s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-nodejs-multicontainer
Stack Traces | 427s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-java-multicontainer
Stack Traces | 427s run time
($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-nodejs
Stack Traces | 427s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-python-multicontainer
Stack Traces | 428s run time
($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-nodejs-volume
Stack Traces | 441s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true
::instrumentation-java-tls
Stack Traces | 450s run time
($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_exporter_sent_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_metric_points_total'].value | [0] > `1`): Invalid value: null: Expected value: true; ($metrics[?as_string(metric."__name__") == 'otelcol_receiver_accepted_spans_total'].value | [0] > `1`): Invalid value: null: Expected value: true

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Beta promotion of operator.collector.usedefaulttelemetryshape sets
without_type_suffix=true by default, so the collector's self-telemetry
metrics no longer carry the _total counter suffix. Update the
validate-collector-metrics and validate-collector-spans step templates
to assert on the new names.

Signed-off-by: nikhilmantri0902 <nikhil.mantri1999@gmail.com>
@nikhilmantri0902

Copy link
Copy Markdown
Contributor Author

@swiatekm can you review this, its ready.

@swiatekm swiatekm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good to me, left some comments about the documentation.

@@ -0,0 +1,17 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Users wanting the pre-v0.152.0 metric name shape can disable the gate via --feature-gates=-operator.collector.usedefaulttelemetryshape, or pin without_type_suffix/without_units/without_scope_info to false explicitly under spec.config.service.telemetry. The gate will be promoted to stable and removed in a future release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the users' perspective, this will take place in v0.154.0, so that's the version we should refer to. This comment applies to other bits of documentation in this PR too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

Address review on open-telemetry#5204:
- chloggen change_type: enhancement -> breaking
- replace pre-v0.152.0 with pre-v0.154.0 across chloggen subtext,
  featuregate description/comment, AddPrometheusMetricsEndpoint comment,
  and config_test comment (v0.152.0/v0.153.0 shipped with the alpha-off
  default, so the user-visible shape change actually lands in v0.154.0).

Signed-off-by: nikhilmantri0902 <nikhil.mantri1999@gmail.com>
@swiatekm
swiatekm merged commit 33ecc84 into open-telemetry:main Jun 11, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants