-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Figure out how to implement hints #5036
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
Comments
A few pieces of feedback here:
(Thanks to @AbhiPrasad for being the one to originally surface the second point, which I feel more strongly about the more I think about it. Just typing out that paragraph made me want to go back and add the very into I'd very much rather.) |
I agree with Katie that it feels like everything should be in the event object. Here @philipphofmann said:
Is there any specific reason for this? While it's convenient that The only downside I can see is if Relay rejects envelopes with unknown/invalid properties. We'd need tests to ensure random properties dont sneak through into the event payload. |
I think that is the reason itself. Maybe @bruno-garcia or @marandaneto, can you elaborate? |
@bruno-garcia talked about it with @mitsuhiko probably a while ago, so I am not aware either. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Problem Statement
Ideally, hints are aligned across SDKs.
A big part of the discussion is probably how to deal with attachments.
Use cases for hints:
captureEvent
, like a one-off attachmentThe Java SDK has moved from an
Object
to aMap<String, Object>
for hints here getsentry/sentry-java#1929 . We could build on top of this by adding our custom version ofMap
that has some helper methods on it, to make it easier to e.g. add attachments. Using some Util would do something similar but developers have to learn about the utils existence whereas they could have their IDE suggest how to do certain things via the helpers on our version of the Map.A different approach would be to pass in an object with the methods we need and hide the map inside. This way we wouldn't pollute our hint API with things a Map can do but are not important to hints.
Another use case that was mentioned is to allow developers to store their custom data in hints to have access to it later (
beforeSend
/eventProcessor
).Closely related: #4996
Solution Brainstorm
Possible implementation that comes to mind:
captureEvent
- Add the ability to attach on hard crash only sentry-java#1467beforeSend
oreventProcessor
captureEvent
attachments that are in the hint should be sent (in case the event itself wasn't dropped)The text was updated successfully, but these errors were encountered: