This repository was archived by the owner on Aug 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 218
fix: Document span.finish optional endTimestamp arg
#508
Merged
Merged
Changes from all commits
Commits
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
fix: Document
span.finish optional endTimestamp arg
The `span.finish()` and `transaction.finish()` methods can be given an optional `endTimestamp` value that allows for users to override the endTimestamp of a span/transaction. This is currently implemented in the JavaScript SDK https://github.com/getsentry/sentry-javascript/blob/bb6f86502e1ea551fa503136a954844f77cca322/packages/tracing/src/span.ts#L232-L234 This PR updates the develop documentation to reflect this capability.
- Loading branch information
commit 54086980b5d0ec120cfdd2a4afd025c91b93fab3
There are no files selected for viewing
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
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.
Is there any sort of validation? e.g. if the given
endTimestampif before thestartTimestampand if so, should it log an error or what?Asking that because of getsentry/sentry-dart#676
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.
At the current moment there is no validation in JS or Python. We can think about adding this though? Should we add to the spec?
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.
Ideally yes, our PR logs that the
endTimestampis before thestartTimestampand sets the current timestamp.If this sounds like a good approach, we could document to the spec.
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.
I think we should ask around. Think logging is a good idea, but not sure about setting current timestamp if there is an error.
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.
This is in TSC already, we can make another PR if that's the case, so we unblock this one.