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

refactor(sdk-trace-base)!: remove Span class from exports #5048

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

david-luna
Copy link
Contributor

@david-luna david-luna commented Oct 7, 2024

Which problem is this PR solving?

Removes the Span constructor from the exports so users are compelled to use tracer.startSpan API which is safer. Instead of the class the SDK exports now a type with the same properties.

Ref: #3597

Short description of the changes

  • make Span a type and not a class
  • rename span class to SpanImpl
  • use the SpanImpl constructor internally (src & tests)
  • export only the Span type in index.ts

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?

  • compiled all packages
  • ran tests for all packages

Checklist:

@david-luna david-luna requested a review from a team as a code owner October 7, 2024 14:55
@david-luna david-luna changed the title refactor(sdk-trace-base): remove Span class from exports refactor(sdk-trace-base)!: remove Span class from exports Oct 7, 2024
@pichlermarc pichlermarc added the target:next-major-release This PR targets the next major release (`next` branch) label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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