Skip to content

Document metric api interfaces that methods need to be safe to be called concurrently#7952

Merged
MrAlias merged 3 commits intoopen-telemetry:mainfrom
dashpole:concurrent_safe
Feb 26, 2026
Merged

Document metric api interfaces that methods need to be safe to be called concurrently#7952
MrAlias merged 3 commits intoopen-telemetry:mainfrom
dashpole:concurrent_safe

Conversation

@dashpole
Copy link
Copy Markdown
Contributor

Fixes #7864

Follows this spec change: open-telemetry/opentelemetry-specification#4868

Comment thread metric/meter.go Outdated
@dashpole dashpole added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.7%. Comparing base (d11f32c) to head (1923ea9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7952   +/-   ##
=====================================
  Coverage   81.7%   81.7%           
=====================================
  Files        304     304           
  Lines      23287   23287           
=====================================
+ Hits       19034   19037    +3     
+ Misses      3866    3864    -2     
+ Partials     387     386    -1     
Files with missing lines Coverage Δ
metric/asyncfloat64.go 100.0% <ø> (ø)
metric/asyncint64.go 100.0% <ø> (ø)
metric/syncfloat64.go 100.0% <ø> (ø)
metric/syncint64.go 100.0% <ø> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dashpole, do we want to make a similar PR for Trace API?

@dashpole
Copy link
Copy Markdown
Contributor Author

Yep, waiting for the spec PR to merge

@MrAlias MrAlias added this to the v1.41.0 milestone Feb 26, 2026
@MrAlias MrAlias added the documentation Provides helpful information label Feb 26, 2026
@MrAlias MrAlias merged commit 988a625 into open-telemetry:main Feb 26, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Provides helpful information Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document behavior of concurrent calls of Int64Counter.Add() method and others

3 participants