Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SDK] Add meter scope configurator #3268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 21, 2025

Conversation

psx95
Copy link
Contributor

@psx95 psx95 commented Feb 11, 2025

Contributes to #2641

Adds scope configurator for Meters.

Similar work was done for Tracers in #3137.

Changes

  • Updates the Metrics SDK to add support for MeterConfigurator as per the spec changes.
  • Adds a MeterConfig class that can be used to configure a meter's behavior as per spec.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit efe1859
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/67b84fff12e5ae00082c4c13

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 98.24561% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.41%. Comparing base (4b56f63) to head (efe1859).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sdk/src/metrics/meter.cc 96.88% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3268      +/-   ##
==========================================
+ Coverage   87.96%   89.41%   +1.46%     
==========================================
  Files         205      207       +2     
  Lines        6407     6457      +50     
==========================================
+ Hits         5635     5773     +138     
+ Misses        772      684      -88     
Files with missing lines Coverage Δ
sdk/include/opentelemetry/sdk/metrics/meter.h 57.15% <ø> (ø)
...k/include/opentelemetry/sdk/metrics/meter_config.h 100.00% <100.00%> (ø)
sdk/src/metrics/meter_config.cc 100.00% <100.00%> (ø)
sdk/src/metrics/meter_context.cc 77.34% <100.00%> (+1.28%) ⬆️
sdk/src/metrics/meter_provider.cc 87.18% <100.00%> (ø)
sdk/src/metrics/meter_provider_factory.cc 82.36% <100.00%> (+7.36%) ⬆️
sdk/src/metrics/meter.cc 82.50% <96.88%> (+20.15%) ⬆️

... and 7 files with indirect coverage changes

@psx95 psx95 force-pushed the add-meter-scope-config branch from 68b0151 to d151ba8 Compare February 11, 2025 21:17
@psx95 psx95 force-pushed the add-meter-scope-config branch from d151ba8 to e2c22df Compare February 11, 2025 21:42
@psx95 psx95 force-pushed the add-meter-scope-config branch from 5f9bdd3 to a674d49 Compare February 12, 2025 18:54
@psx95 psx95 force-pushed the add-meter-scope-config branch from ce84ad6 to 92207b5 Compare February 13, 2025 20:20
@psx95 psx95 marked this pull request as ready for review February 13, 2025 20:20
@psx95 psx95 requested a review from a team as a code owner February 13, 2025 20:21
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@psx95 psx95 mentioned this pull request Feb 20, 2025
3 tasks
@marcalff marcalff merged commit a7f9daf into open-telemetry:main Feb 21, 2025
58 checks passed
@psx95 psx95 deleted the add-meter-scope-config branch February 21, 2025 16:31
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