Skip to content

Remove SingleCounterForRate option from OTEL output - #5830

Merged
ankur22 merged 1 commit into
masterfrom
drop-single-counter-for-rate
Apr 22, 2026
Merged

ankur22 merged 1 commit into
masterfrom
drop-single-counter-for-rate

Conversation

@ankur22

@ankur22 ankur22 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

What?

Remove the deprecated SingleCounterForRate config option and all supporting code from the OpenTelemetry output. Rate metrics are now always exported as a single counter with a condition attribute (nonzero/zero).

Why?

The SingleCounterForRate option was added in PR #5164 as a temporary escape hatch so users could revert to the old pair-of-counters behavior (<metric>.occurred + <metric>.total) for one release cycle. The old method had a cold-startup bug where .occurred was never created if the rate never fired (see #4573).

The issue explicitly stated: "This option is temporary and will be removed in the release following its introduction." v2 is the appropriate semver boundary for this removal.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Related PR(s)/Issue(s)

Closes #5185

Drop the deprecated SingleCounterForRate config
option from the OpenTelemetry output. Rate metrics
are now always exported as a single counter with a
condition attribute (nonzero/zero). The old pair of
counters method (.occurred + .total) and its feature
flag (K6_OTEL_SINGLE_COUNTER_FOR_RATE) are removed.

Resolves: #5185
@ankur22
ankur22 temporarily deployed to azure-trusted-signing April 10, 2026 11:13 — with GitHub Actions Inactive
@ankur22
ankur22 temporarily deployed to azure-trusted-signing April 10, 2026 11:15 — with GitHub Actions Inactive
@ankur22 ankur22 added this to the v2.0.0 milestone Apr 10, 2026
@ankur22
ankur22 requested a review from codebien April 10, 2026 11:21
@ankur22
ankur22 marked this pull request as ready for review April 10, 2026 11:22
@ankur22
ankur22 requested a review from a team as a code owner April 10, 2026 11:22
@ankur22
ankur22 requested review from inancgumus and removed request for a team April 10, 2026 11:22
@ankur22
ankur22 merged commit 5dfcf18 into master Apr 22, 2026
52 checks passed
@ankur22
ankur22 deleted the drop-single-counter-for-rate branch April 22, 2026 09:35
@mstoykov mstoykov modified the milestones: v2.0.0, v2.0.0-rc1 Apr 22, 2026

This branch was previously deployed

1 inactive deployment
azure-trusted-signing โ€” 5de4c094 Deployed Apr 10, 2026 by ankur22 via sign-packages #8937
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.

Drop SingleCounterForRate

4 participants