Skip to content

Go SDK: add details for opentelemetry and monotonic counters#4878

Open
yuandrew wants to merge 3 commits into
mainfrom
sdk-go-opentelemetry
Open

Go SDK: add details for opentelemetry and monotonic counters#4878
yuandrew wants to merge 3 commits into
mainfrom
sdk-go-opentelemetry

Conversation

@yuandrew

@yuandrew yuandrew commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Mentions a new flag users can set to correct metric type for monotonic counters.

Notes to reviewers

temporalio/sdk-go#2452 for more details

┆Attachments: EDU-6711 Go SDK: add details for opentelemetry and monotonic counters

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Jul 16, 2026 6:24pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

@yuandrew
yuandrew marked this pull request as ready for review July 16, 2026 18:12
@yuandrew
yuandrew requested a review from a team as a code owner July 16, 2026 18:12

Monotonic counters let exporters and metrics backends classify Temporal SDK counters correctly.
The [`MetricsCounter`](https://pkg.go.dev/go.temporal.io/sdk/client#MetricsCounter) contract defines counters as ever-increasing.
If you create custom counters through the same metrics handler, pass only non-negative values to `Inc`.

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.

what is Inc? I assume that's the increment function but it's just not referenced anywhere else and I didn't see it in the doc linked right before this.

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.

Good callout, Dan made a similar point in his review of my SDK PR, forgot to make it more clear here! Pointed to the go docs

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