Skip to content

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

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
mcculls/fix-otel-async-counter-behaviour
May 12, 2026
Merged

Fix the behaviour of asynchronous counters and up-down counters#11332
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
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 maintain a sum, asynchronous callbacks record the absolute value of the counter and then report that value or a delta depending on the temporality preference:

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.

@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
@mcculls mcculls requested a review from mtoffl01 May 11, 2026 09:49
@mcculls mcculls force-pushed the mcculls/fix-otel-async-counter-behaviour branch 3 times, most recently from fe56ec1 to d8b110a Compare May 12, 2026 16:26
Unlike synchronous counters which take the increment/delta value,
asynchronous callbacks report the absolute value of the counter.
@mcculls mcculls force-pushed the mcculls/fix-otel-async-counter-behaviour branch from d8b110a to 7951fb3 Compare May 12, 2026 16:27
@mcculls mcculls added this pull request to the merge queue May 12, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 12, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 12, 2026

View all feedbacks in Devflow UI.

2026-05-12 18:59:05 UTC ℹ️ Start processing command /merge


2026-05-12 18:59:10 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-05-12 20:15:54 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 19fa98a into master May 12, 2026
573 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the mcculls/fix-otel-async-counter-behaviour branch May 12, 2026 20:15
@github-actions github-actions Bot added this to the 1.63.0 milestone May 12, 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.

2 participants