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(sdk-trace-*):! drop unintentional/unnecessary exports #5405

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

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

Drops unintentional exports from the @opentelemetry/sdk-trace-base package and dependents.
This PR removes:

Refs #5290 (for removing *_FACTORY)
Refs #5283 (for removing the export of the Tracer class)

Type of change

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

How Has This Been Tested?

  • Modified existing tests

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -316,37 +317,4 @@ describe('SimpleSpanProcessor', () => {
assert.equal(exporterCreatedSpans.length, 0);
});
});

// TODO: https://github.com/open-telemetry/opentelemetry-js/pull/4238#issuecomment-1788516773
Copy link
Member Author

Choose a reason for hiding this comment

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

reviewer note: this is not applicable since 2.x does not need to be compatible with 1.x packages.

@@ -84,7 +81,7 @@ export class BasicTracerProvider implements TracerProvider {
name: string,
version?: string,
options?: { schemaUrl?: string }
): Tracer {
): ApiTracer {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: if there's time, I'll also follow-up with renaming the now internal tracer to SdkTracer to avoid having to do this and to have the code be more readable.

I've opted to not do this in this PR to keep the diff somewhat contained.

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 (53192bf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5405   +/-   ##
=======================================
  Coverage   94.64%   94.64%           
=======================================
  Files         318      318           
  Lines        8033     8033           
  Branches     1688     1688           
=======================================
  Hits         7603     7603           
  Misses        430      430           
Files with missing lines Coverage Δ
...elemetry-sdk-trace-base/src/BasicTracerProvider.ts 95.58% <ø> (ø)

@@ -137,7 +138,9 @@ describe('BasicTracerProvider', () => {
describe('generalLimits', () => {
describe('when not defined default values', () => {
it('should have tracer with default values', () => {
const tracer = new BasicTracerProvider({}).getTracer('default');
const tracer = new BasicTracerProvider({}).getTracer(
Copy link
Member Author

@pichlermarc pichlermarc Jan 30, 2025

Choose a reason for hiding this comment

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

note for reviewers: there are quite a few of these as we assert on internals.

@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:40
@pichlermarc pichlermarc requested a review from a team as a code owner January 30, 2025 16:40
@pichlermarc pichlermarc changed the title feat(sdk-trace-*):! drop unintentional exports feat(sdk-trace-*):! drop unintentional/unnecessary exports Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants