Go SDK: add details for opentelemetry and monotonic counters#4878
Open
yuandrew wants to merge 3 commits into
Open
Go SDK: add details for opentelemetry and monotonic counters#4878yuandrew wants to merge 3 commits into
yuandrew wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📖 Docs PR preview links
|
|
|
||
| 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`. |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
dustin-temporal
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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