Skip to content

[CONFIGURATION] Apply default sampler when none is specified#4170

Open
RaviTriv wants to merge 2 commits into
open-telemetry:mainfrom
RaviTriv:ravtrive/config-default-sampler
Open

[CONFIGURATION] Apply default sampler when none is specified#4170
RaviTriv wants to merge 2 commits into
open-telemetry:mainfrom
RaviTriv:ravtrive/config-default-sampler

Conversation

@RaviTriv

@RaviTriv RaviTriv commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #4034

Changes

PR to apply default sampler when one is not set in the trace provider configuration. Updated the parser to apply ParentBasedSamplerConfiguration with AlwaysOnSamplerConfiguration as per the spec when no sampler is specified.

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

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.83%. Comparing base (d6035a8) to head (07322f1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4170      +/-   ##
==========================================
+ Coverage   82.82%   82.83%   +0.01%     
==========================================
  Files         406      406              
  Lines       16913    16917       +4     
==========================================
+ Hits        14007    14011       +4     
  Misses       2906     2906              
Files with missing lines Coverage Δ
sdk/src/configuration/configuration_parser.cc 77.63% <100.00%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RaviTriv RaviTriv marked this pull request as ready for review June 19, 2026 09:46
@RaviTriv RaviTriv requested a review from a team as a code owner June 19, 2026 09:47
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.

[CONFIGURATION] default sampler in config

1 participant