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

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 (7332f3a) to head (a1c13a7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5405   +/-   ##
=======================================
  Coverage   94.64%   94.64%           
=======================================
  Files         317      317           
  Lines        8025     8025           
  Branches     1687     1687           
=======================================
  Hits         7595     7595           
  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
@pichlermarc pichlermarc added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jan 31, 2025
@pichlermarc pichlermarc enabled auto-merge January 31, 2025 09:25
@pichlermarc pichlermarc added this pull request to the merge queue Jan 31, 2025
Merged via the queue into open-telemetry:main with commit f9fda8b Jan 31, 2025
17 checks passed
@pichlermarc pichlermarc deleted the feat/sdk-trace-base-exports branch January 31, 2025 14:26
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