Skip to content

[API/SDK] feat: exemplar filters#4191

Open
proost wants to merge 4 commits into
open-telemetry:mainfrom
proost:feat-exemplar-filters
Open

[API/SDK] feat: exemplar filters#4191
proost wants to merge 4 commits into
open-telemetry:mainfrom
proost:feat-exemplar-filters

Conversation

@proost

@proost proost commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes

Changes

Complete exemplar filter.

This changes accompany breaking change. When I read versioning policy, flagged feature is unstable, so API breaking change is accepted, right?

I tried to abstract filte logic into FilteredExemplarReservoir to avoid filtering logic scattered to metric storage.

Please provide a brief description of the changes here.

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

@proost proost requested a review from a team as a code owner June 30, 2026 07:15
@proost proost changed the title feat: exemplar filters [API/SDK] feat: exemplar filters Jun 30, 2026
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.96%. Comparing base (a56f0e2) to head (34cc7e6).

Files with missing lines Patch % Lines
api/include/opentelemetry/trace/context.h 63.64% 4 Missing ⚠️
...sdk/metrics/exemplar/filtered_exemplar_reservoir.h 88.89% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4191      +/-   ##
==========================================
+ Coverage   82.89%   82.96%   +0.07%     
==========================================
  Files         405      406       +1     
  Lines       17292    17308      +16     
==========================================
+ Hits        14332    14357      +25     
+ Misses       2960     2951       -9     
Files with missing lines Coverage Δ
...ude/opentelemetry/sdk/metrics/exemplar/reservoir.h 100.00% <ø> (ø)
...entelemetry/sdk/metrics/exemplar/reservoir_utils.h 100.00% <100.00%> (ø)
...telemetry/sdk/metrics/state/async_metric_storage.h 95.24% <100.00%> (+4.33%) ⬆️
...ntelemetry/sdk/metrics/state/sync_metric_storage.h 89.86% <100.00%> (+7.58%) ⬆️
sdk/src/logs/logger.cc 93.55% <100.00%> (+3.83%) ⬆️
sdk/src/metrics/exemplar/reservoir.cc 75.00% <100.00%> (+8.34%) ⬆️
sdk/src/metrics/meter.cc 81.36% <ø> (ø)
...sdk/metrics/exemplar/filtered_exemplar_reservoir.h 88.89% <88.89%> (ø)
api/include/opentelemetry/trace/context.h 82.61% <63.64%> (-17.39%) ⬇️

... and 1 file with indirect coverage changes

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

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.

1 participant