Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/docs/sdk/performance/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ tree as well as the unit of reporting to Sentry.

- `Span.finish()`

- Just set `endTimestamp` to the current time (in payload `timestamp`)
- Accepts an optional `endTimestamp` to allow users to set a custom `endTimestamp` on the finished span
Copy link
Contributor

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 endTimestamp if before the startTimestamp and if so, should it log an error or what?
Asking that because of getsentry/sentry-dart#676

Copy link
Member Author

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?

Copy link
Contributor

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 endTimestamp is before the startTimestamp and sets the current timestamp.
If this sounds like a good approach, we could document to the spec.

Copy link
Member Author

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.

Copy link
Contributor

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.

- If an `endTimestamp` value is not provided, set `endTimestamp` to the current time (in payload `timestamp`)

- `Transaction.finish()`
- `super.finish()` (call finish on Span)
- Send it to Sentry only if `sampled == true`
- Like spans, can be given an optional `endTimestamp` value that should be passed into the `span.finish()` call
- A `Transaction` needs to be wrapped in an `Envelope` and sent to the [Envelope Endpoint](/sdk/envelopes/)
- The `Transport` should use the same internal queue for `Transactions` / `Events`
- The `Transport` should implement category-based rate limiting →
Expand Down