Skip to content

Conversation

@taisho6339
Copy link

@taisho6339 taisho6339 commented Nov 23, 2025

Fixes #3037

Changes

  • Add clear documentation for monotonic counters, mentioning that negative values are dropped
  • Add validations to reject negative values in sdk for Counter and ObservableCounter

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

❌ Patch coverage is 88.97638% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.8%. Comparing base (df412fe) to head (4adf9b8).

Files with missing lines Patch % Lines
opentelemetry-sdk/src/metrics/internal/sum.rs 88.8% 8 Missing ⚠️
...emetry-sdk/src/metrics/internal/precomputed_sum.rs 89.0% 6 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #3260    +/-   ##
======================================
  Coverage   80.8%   80.8%            
======================================
  Files        129     129            
  Lines      23203   23330   +127     
======================================
+ Hits       18750   18863   +113     
- Misses      4453    4467    +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@taisho6339 taisho6339 marked this pull request as ready for review November 23, 2025 02:10
@taisho6339 taisho6339 requested a review from a team as a code owner November 23, 2025 02:10
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.

[Bug]: f64_counter can be decremented

1 participant