feat(dev/logs): Add sentry.log.sequence definition to the logs' spec#16492
Draft
feat(dev/logs): Add sentry.log.sequence definition to the logs' spec#16492
sentry.log.sequence definition to the logs' spec#16492Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
sentry.log.sequence definition to the logs' specsentry.log.sequence definition to the logs' spec
Dav1dde
reviewed
Feb 23, 2026
Comment on lines
+309
to
+310
| The sequence number **MUST NOT**: | ||
| - Be intentionally reset during the process lifetime. |
Member
There was a problem hiding this comment.
You only need it as a discriminator per timestamp, so maybe that's enough as a constraint?
| "sentry.message.parameter.1": { "value": 85, "type": "integer" }, | ||
| "sentry.message.parameter.2": { "value": 60, "type": "integer" } | ||
| "sentry.message.parameter.2": { "value": 60, "type": "integer" }, | ||
| "sentry.log.sequence": { "value": 0, "type": "integer" } |
Member
There was a problem hiding this comment.
I wonder if this should be top-level, it feels heavily tied to the timestamp and a fundamental attribute of a log.
@k-fish wdyt?
| - Be intentionally reset during the process lifetime. | ||
| - Be used to modify or synthesize sub-millisecond timestamp precision. | ||
|
|
||
| The sequence provides deterministic ordering within a single SDK instance. It does not guarantee ordering across independent processes or workers, which have separate counters. |
Member
There was a problem hiding this comment.
But it does between separate threads?
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.
This pull request updates the telemetry logs specification to introduce deterministic log ordering via a new attribute,
sentry.log.sequence. This change addresses issues in environments where multiple logs can share identical timestamps, ensuring logs can always be ordered correctly.The attribute addresses an issue that came up in Cloudflare’s runtime which freezes all timers and clock functions, causing all timestamp calls to return the same value. This can lead to logs being displayed out of order if they don’t get sent in one request. Instead, they’ll appear in the order of arrival in ingest, which is subject to request latencies and out-of-order request completion.
This is a proposal as we have yet to see what product thinks about this.