-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(apm): Sampling of traces #2500
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
94a9e2e
fix(apm): Set sampled to true by default
HazAT a92c730
meta: Changelog
HazAT 715bd45
fix(apm): Sampling
HazAT c82f1d8
ref: Remove set default op
HazAT 7c8d803
fix: Sampling decision
HazAT 895c188
ref: Add comment
HazAT b0870b6
ref: typo
HazAT a5b5f2b
ref: Changes to docblock
HazAT 2c662dc
ref: Change message
HazAT b96e512
Apply suggestions from code review
HazAT 4139da7
Update packages/types/src/options.ts
HazAT 5a66e0b
Update packages/types/src/options.ts
HazAT 450259e
ref: Remove deprecated parts
HazAT b29a8b4
Merge branch 'apm/set-sampled' of github.com:getsentry/sentry-javascr…
HazAT 86ce10f
fix: Maxlen
HazAT a1b2496
ref: Rework when and how integrations are setup
HazAT ea581e7
ref(apm): Send a span if it's not a child
HazAT 3583578
ref: Tracing integration
HazAT 2bbd2e7
fix: tests
HazAT c3f2750
fix: Span / Transaction creation
HazAT de8fefa
ref: CodeReview
HazAT 29f392e
fix: Setup integrations when after we bound a client to the hub
HazAT 878a8fc
ref: CodeReview
HazAT a2733e6
fix: tests
HazAT 74a9894
Update packages/types/src/span.ts
HazAT 319fe10
Merge branch 'apm/set-sampled' of github.com:getsentry/sentry-javascr…
HazAT 4332b35
ref: CodeReview
HazAT 7a114f5
ref: CodeReview
HazAT a695cd9
fix: Tests
HazAT 498e3ff
ref: Refactor SpanRecorder -> SpanList
HazAT 26bee09
ref: Rename back to SpanRecorder to be consistent with Python
HazAT a2351ab
ref: SpanRecorder
HazAT 0ad436e
ref: Remove makeRoot
HazAT 6d471b9
ref: Changelog
HazAT 106905d
meta: Changelog
HazAT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
|| 0
here hides a configuration error or the unavailability ofclient
, and has bitten us.tracesSampleRate
is already defaulted when setting the client options, I think we should not do the|| 0
here, wdyt?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, isn't it a programming error if
client
isundefined
?Shouldn't we be able to write simply:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client
can be optional on the hub, that's why we need it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no
client
, thensampleRate
can only be 0, okay.Wouldn't this be a case to log a debug message? We debug log when the noop transport is in use in the Go SDK => when one sees that in the debug log, it is obvious why events are not sent. Here it seems like a similar situation, if there is no client we can't ever send any event, the SDK is somewhat disabled.