-
Notifications
You must be signed in to change notification settings - Fork 93
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(ourlogs): Preliminary breadcrumb to log conversion #4479
base: master
Are you sure you want to change the base?
Conversation
This converts breadcrumbs in a fairly simplistic way into our log format, behind a sample-rate to mitigate load when rolling this out (and also the existing enable flag).
e07396f
to
b678b22
Compare
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 will generate an almost infinite amount of duplicate log entries.
Breadcrumbs are not cleared for event emissions, every event can and will contain the same log lines.
Worst case on every error you receive, you extract the same 100 log lines. That's a pretty bad amplification vector.
Assuming this were to be enabled in prod, yes. Fortunately we're only enabling it for a specific project on s4s at this time. (project flag incoming). More generally, deduplication will be handled by an experimental sdk flag that send the events here. Noted though, we don't want a flood in the off chance of a bad sdk setup, so we should guard against others sending here so I'll update it to block if a context value isn't found. |
#[metastructure(tag = "sentry_logs")] | ||
OurLogs(Box<OurLogsContext>), |
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.
Are these hard to remove later or is the deprecation sticky? If they are I'm probably going to delay this a week until Abhi is back and we can make sure everyone is fine with the context on the sdk side.
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.
Removing the variant from the code is not a problem. After removing it, relay will still forward the context as if it were a user-defined context.
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.
Great
#[metastructure(tag = "sentry_logs")] | ||
OurLogs(Box<OurLogsContext>), |
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.
Removing the variant from the code is not a problem. After removing it, relay will still forward the context as if it were a user-defined context.
Summary
This converts breadcrumbs in a fairly simplistic way into our log format, behind a sample-rate to mitigate load when rolling this out (and also the existing enable flag).
Other:
Needs:
Related: