Skip to content

Fix the behaviour of asynchronous counters and up-down counters#11332

Open
mcculls wants to merge 1 commit intomasterfrom
mcculls/fix-otel-async-counter-behaviour
Open

Fix the behaviour of asynchronous counters and up-down counters#11332
mcculls wants to merge 1 commit intomasterfrom
mcculls/fix-otel-async-counter-behaviour

Conversation

@mcculls
Copy link
Copy Markdown
Contributor

@mcculls mcculls commented May 10, 2026

What Does This Do

Switches the underlying storage for asynchronous counters and up-down counters to expect absolute values from the callback, as per the spec.

Motivation

Unlike synchronous counters which take the increment/delta value, asynchronous callbacks report the absolute value of the counter:

https://opentelemetry.io/docs/specs/otel/metrics/api/#asynchronous-counter-creation

Contributor Checklist

Jira ticket: APMAPI-1937

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

Unlike synchronous counters which take the increment/delta value,
asynchronous callbacks report the absolute value of the counter.
@mcculls mcculls requested review from a team as code owners May 10, 2026 00:41
@mcculls mcculls requested review from mhlidd and removed request for a team May 10, 2026 00:41
@mcculls mcculls added type: bug Bug report and fix inst: opentelemetry OpenTelemetry instrumentation labels May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant