Skip to content

Conversation

@majanjua-amzn
Copy link
Contributor

@majanjua-amzn majanjua-amzn commented Nov 26, 2025

Which problem is this PR solving?

Part of open-telemetry/opentelemetry-specification#4698

Introduces a way for users to access the RECORD_ONLY functionality of the sampler, as currently all available samplers either provide a RECORD_AND_SAMPLE or DROP response.

Short description of the changes

  • Introduced new AlwaysRecordSampler
  • Added relevant unit tests

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit tests and extensively used in aws-otel-js-instrumentation

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@majanjua-amzn majanjua-amzn requested a review from a team as a code owner November 26, 2025 00:29
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.41%. Comparing base (167185a) to head (bd73ff8).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6168   +/-   ##
=======================================
  Coverage   95.40%   95.41%           
=======================================
  Files         317      318    +1     
  Lines        9439     9458   +19     
  Branches     2187     2190    +3     
=======================================
+ Hits         9005     9024   +19     
  Misses        434      434           
Files with missing lines Coverage Δ
...s/sampler-always-record/src/AlwaysRecordSampler.ts 100.00% <100.00%> (ø)

... 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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