Skip to content
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

feat(core)!: remove TracesSamplerValues from exports #5406

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Jan 30, 2025

Which problem is this PR solving?

TracesSamplerValues was part of the public API of @opentelemetry/core, even though we never consume it anywhere other than in @opentelemetry/sdk-trace-base. This PR removes the export from core and moves it into the trace package to cut down on API surface. Also makes the enum a const enum instead for size reasons and since we only use it internally.

Refs #5172

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Existing tests

@pichlermarc pichlermarc added pkg:core pkg:sdk-trace-base target:next-major-release This PR targets the next major release (`next` branch) labels Jan 30, 2025
@pichlermarc pichlermarc added this to the OpenTelemetry SDK 2.0 milestone Jan 30, 2025
@pichlermarc pichlermarc marked this pull request as ready for review January 30, 2025 16:37
@pichlermarc pichlermarc requested a review from a team as a code owner January 30, 2025 16:37
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.64%. Comparing base (c513965) to head (1614c10).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5406      +/-   ##
==========================================
- Coverage   94.64%   94.64%   -0.01%     
==========================================
  Files         318      317       -1     
  Lines        8033     8025       -8     
  Branches     1688     1687       -1     
==========================================
- Hits         7603     7595       -8     
  Misses        430      430              
Files with missing lines Coverage Δ
...ckages/opentelemetry-core/src/utils/environment.ts 96.82% <ø> (-0.05%) ⬇️
...ackages/opentelemetry-sdk-trace-base/src/config.ts 88.37% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:core pkg:sdk-trace-base target:next-major-release This PR targets the next major release (`next` branch)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants