Open adamgsg opened 2 years ago
Routing to @getsentry/ecosystem for triage. ⏲️
Hi @adamgsg, what do you mean by custom error message and how is it being generated?
If I export the issue as JSON, I can see that the field used for Slack Notifications is coming from either:
But the field we want to see in slack is just the ".message" field.
I found the place where this is happening: https://github.com/getsentry/sentry/blob/d81985575e1b0a9eebdb65f240db02c6f52ec2ff/src/sentry/integrations/slack/message_builder/issues.py#L74
So this is definitely using the ".metadata.value" field for slack notifications. How can we make it use the ".message" field isntead?
If it helps, this is how we're sending our events via the go sdk:
event := sentry.NewEvent()
event.EventID = ...
event.Environment = ...
event.Message = ...
event.User = ...
event.Timestamp = ...
event.ServerName = ...
event.Release = ...
event.Level = ...
event.Logger = ...
event.Tags = ...
event.Platform = ...
event.Contexts = ...
event.Exception = ...
event.Fingerprint = ...
hint := ...
client.CaptureEvent(event, &hint, nil)
Any idea, @manuzope ? This may also be related to a similar issue I just reported in #30566
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 Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
bump
@adamgsg if an event contains an exception (those its an "error" event), the message will always be formed out of internal exception type and value. message
field is used for exception-less events, so you'd need to skip it if you want provided message to be your "main" value.
However, the builder itself doesn't look for the message value as you already pointed out in the link above, so it'd need to be changed there first.
Hi @adamgsg , sorry for the delayed response, is there any fields that you wish you could see in the slack alert in addition to the message field?
@Dhrumil-Sentry - Yes. If possible, it would be great to include a context field or an "extra data" field in slack alerts, the same way we can currently include tags.
Routing to @getsentry/product-owners-alerts for triage ⏲️
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 remove the label Waiting for: Community
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Looks like this shouldn't be staled
[...] is there any fields that you wish you could see in the slack alert in addition to the message field?
@Dhrumil-Sentry This issue has apparently superseded https://github.com/getsentry/sentry/issues/26006, which tracked the request for "culprit" in Slack messages. So it would be great if culprit would be added to the list of desired fields. It is extremely useful for quickly triaging errors in Slack without having to click each one to go into the web-UI.
For reference, by "culprit" I mean the base level "context/transaction/location/trigger" in the code where the error happened (in our django-app it will typically be the endpoint that was called or the task that was running). It is given pride of place in the web-UI, right next to the actual error-title, and it seems to be at the key "culprit" in the api response.
@Dhrumil-Sentry I contributed a Pull Request for the culprit part of this issue: https://github.com/getsentry/sentry/pull/72587 It seems like Sentry does accept PRs from outside collaborators, but just let me know if you don't want this one, or how I get a review on it :)
Routing to @getsentry/product-owners-settings-integrations for triage ⏲️
Environment
SaaS (https://sentry.io/)
Version
SaaS
Steps to Reproduce
Expected Result
The Slack notification includes the custom error message
Actual Result
The Slack notification includes the exception text without the message