feat(core): Remove deprecated props from Span interface#10854
Merged
Conversation
mydea
commented
Feb 29, 2024
| import { captureEvent, getCurrentScope } from '@sentry/core'; | ||
| import { GLOBAL_OBJ } from '@sentry/utils'; | ||
|
|
||
| import { captureEvent, getCurrentScope } from '../../src'; |
Member
Author
There was a problem hiding this comment.
I actually fixed a bunch of tests along there way here we we used to import from the package itself (we are in core here), which lead to tests only running on the built output, which is a bit weird IMHO.
mydea
commented
Feb 29, 2024
| const client = new TestClient(options); | ||
| setCurrentClient(client); | ||
| client.init(); | ||
| _resetErrorsInstrumented(); |
Member
Author
There was a problem hiding this comment.
This apparently was not needed before because we imported this from the build output 🤔 now it should be more robust.
eb10a77 to
411cd68
Compare
Contributor
size-limit report 📦
|
6695f6b to
bde49b1
Compare
Instead, in places we need it we cast to a `SentrySpan` which still has the things in place, for now.
bde49b1 to
4c13b0c
Compare
AbhiPrasad
approved these changes
Feb 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead, in places we need it we cast to a
SentrySpanwhich still has the things in place, for now.With this, our span interface is almost the same as for otel spans - missing are only:
traceFlags- this has apparently been updated in OTEL to have typenumberonly, which makes this a bit easier.setStatuswhich has a different signature in OTEL.I'll do these in follow ups!
The biggest work here was fixing tests - I tried to rewrite tests to do less mocking where possible, which IMHO should cover actual functionality better than before (e.g. in svelte).