-
-
Notifications
You must be signed in to change notification settings - Fork 147
Conversation
Can you extract it to a separate function? It's repeated 8 times 😅 func setPacketLevel (packet *Packet, level string) {
if Severity(level) != "" {
packet.Level = Severity(level)
}
}
// ...
setPacketLevel(packet, tags["level"]) |
@stevenon1003 upon the second reading, I just realized that all those packets are just sent through Lines 628 to 659 in c977f96
Therefore, your whole PR, can be summarized to just adding this 3 lines below line 645 😅: if Severity(captureTags["level"]) != "" {
packet.Level = Severity(captureTags["level"])
} |
Thanks @kamilogorek , it is the first time for me to contribute in github / sentry library. Thanks for sharing your idea. |
Awesome! Thanks for your contribution :) |
Currently all sentry messages are ERROR level. To support "debug"/"info"/"warning"/"fatal", we can use tags parameter. Actually in Sentry UI panel, we can see "level" tag but the value is always "error" at this moment.
The change is backward compatible. If developer wants to use this new enhancement, here is an example: