-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Maybe Logger metadata should affect grouping #837
Comments
Mmmm what do we do for errors, do you know? I haven't looked and won't have time til the end of the day. |
@whatyouhide this is what we do: # Used to compare events for deduplication. See "Sentry.Dedupe".
@doc false
@spec hash(t()) :: non_neg_integer()
def hash(%__MODULE__{} = event) do
:erlang.phash2([
event.exception,
event.message,
event.level,
event.fingerprint
])
end Adding metadata to this sounds like a good idea to me. |
I’m not sure because metadata might contain fleeting data that gets updated on every call (imagine a timestamp) but that shouldn't affect deduplication. What do other SDKs do? |
I'm not sure - @sl0thentr0py do you happen to know? |
@solnic you could probably grep through source code of at least the Python and Ruby SDKs because I remember finding this in there pretty easily. |
@whatyouhide I did look for it in ruby and couldn't find it 😅 I'll give it another shot hah |
Maybe:
Logger.error("error from logs", sentry: %{extra: %{response: Bamboo.ApiError.build_api_error("info 1")}})
Logger.error("error from logs", sentry: %{extra: %{response: Bamboo.ApiError.build_api_error("info 1")}})
# Mr Deduplicator: hm, I have seen your hash before, you shall not pass!
# Log event: but that's because I don't have enough entropy!
# Mr Deduplicator: then how about we look into your metadata?
# Log event: but my metadata is super high entropy!
# Mr Deduplicator: then just take a few random fields and be done with it! Garhgh!
# ... etc
|
Right now logged errors seem to be grouped by message only.
Would it make sense to consider a hash of
:sentry
metadata as well?The text was updated successfully, but these errors were encountered: