-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(develop-docs): TelemetryBuffer Process Terminations #15274
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
feat(develop-docs): TelemetryBuffer Process Terminations #15274
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-authored-by: Roman Zavarnitsyn <[email protected]>
Co-authored-by: Roman Zavarnitsyn <[email protected]>
Co-authored-by: Roman Zavarnitsyn <[email protected]>
Bundle ReportChanges will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
Co-authored-by: Roman Zavarnitsyn <[email protected]>
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR - Add a new option `screenshotStrategy` which has been introduced in this [PR](getsentry/sentry-java#4777) and allows customers to specify a more reliable masking strategy. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [x] Other deadline: Ideally next week - [ ] None: Not urgent, can wait up to 1 week+
…#15336) <!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR We changed the default behavior of the integration in the latest Python SDK release. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [x] Other deadline: ASAP as we just released this - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
This PR adds a new product page for drains, and adds a page for vercel log drains as well. Vercel drains are marked as closed alpha for now, but will be promoted to EA this week.
romtsn
left a comment
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.
lgtm, nice job!
philprime
left a comment
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.
LGTM, nice work
|
|
||
| The BatchProcessor uses two buffers to minimize data loss in the event of an abnormal process termination: | ||
| * **Crash-Safe List**: A list stored in a crash-safe space to prevent data loss during detectable abnormal process terminations. | ||
| * **Async IO Cache**: When a process terminates without the SDK being able to detect it, the crash-safe list loses all its elements. Therefore, the BatchProcessor uses a second buffer, the async IO cache, that stores elements to disk on a background thread to avoid blocking the calling thread, which ensures minimal data loss when such terminations occur. |
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.
It's not very clear to me.
If the list is called "crash-safe list", i assume it doesn't lose elements on crash.
Is the crash-safe list kept in memory, while the async IO cache is written to file?
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.
Yes, it doesn't lose elements when the SDK can detect the abnormal process termination.
Is the crash-safe list kept in memory, while the async IO cache is written to file?
Yes exactly. What would help you to make that clearer?
cleptric
left a comment
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 not a good place to document these changes. For one, this page is clearly marked as WIP, and applies to spans only.
Secondly, we have this exact work currently underway by @giortzisg, so I would kindly ask that both of these work streams are merged.
Additonally, this seems to be mostly about mobile, which is fine to be handled differently, but should be also documented accordingly.
Co-authored-by: Shannon Anahata <[email protected]>
Co-authored-by: Shannon Anahata <[email protected]>
develop-docs/sdk/telemetry/telemetry-buffer/browser-telemetry-buffer.mdx
Outdated
Show resolved
Hide resolved
|
Blocked by #15411. |
|
@cleptric, please double check if you are OK with the current structure and place of the spec as you pointed out here #15274 (review). If yes, please approve to unblock this PR. |
|
|
||
| The BatchProcessor MUST forward all items to the transport after the SDK when containing spans or logs exceeding 1MiB in size. The SDK MAY choose a different value for the max batch size keeping the [envelope max sizes](/sdk/data-model/envelopes/#size-limits) in mind. The SDK MUST calculate the size of a span or a log to manage the BatchProcessor's memory footprint. The SDK MUST serialize the span or log and calculate the size based on the serialized JSON bytes. As serialization is expensive, the BatchProcessor SHOULD keep track of the serialized spans and logs and pass these to the envelope to avoid serializing multiple times. | ||
|
|
||
| When the BatchProcessor forwards all spans or logs to the transport, it MUST reset its timeout and remove all spans and logs. The SDK MUST apply filtering and sampling before adding spans or logs to the BatchProcessor. The SDK MUST apply rate limits to spans and logs after they leave the BatchProcessor to send as much data as possible by dropping data as late as possible. |
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.
@philipphofmann Replay is imposing a 1000 log item limit, and SDKs should to send max 100 in and envelope. We should probably also mention this here somewhere. If we only limit size and time without count, envelopes can be dropped by replay.
DESCRIBE YOUR PR
This PR migrates the logs for crashes RFC to the BatchProcessor.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: