getsentry / relay

Sentry event forwarding and ingestion service.
https://docs.sentry.io/product/relay/
Other
312 stars 85 forks source link

Can't change the error level from an Unreal crash reporter event #3727

Closed BenoitJacquier-Sloclap closed 2 weeks ago

BenoitJacquier-Sloclap commented 2 weeks ago

Hi! I'd like to change our crash event from Unreal's crashreporter from "error" to "fatal" If I'm correct, relay only changes the error level when a crash has the "is asset" or "is ensure" tag. Else it's always using the "error" level ( see https://github.com/getsentry/relay/blob/7b8316f6aecdcc000bc53879ff17338225a5415a/relay-server/src/utils/unreal.rs#L249 ) Something like:

if let Some(explicit_level) = context.engine_data.get("level") {
    event.level = Level::from_str(explicit_level).unwrap();
} else {
    if runtime_props.is_assert.unwrap_or(false) {
        event.level = Annotated::new(Level::Error)
    }
    if runtime_props.is_ensure.unwrap_or(false) {
        event.level = Annotated::new(Level::Warning)
    }
}
Dav1dde commented 2 weeks ago

Thanks for the report, I opened a PR which should fix this and allow you to set a level using the Custom Crash Reporter Attributes.

Using the code from the docs, you would add the level via:

config->SetStringField("level", "fatal");
BenoitJacquier-Sloclap commented 2 weeks ago

Thanks! just curious, when this fix will be available in the sentry cloud /nonhosted version ? Regards