getsentry / relay

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

Parse runtime `raw_description` for Unity IL2CPP #1265

Open bruno-garcia opened 2 years ago

bruno-garcia commented 2 years ago

Shows as:

image

    "runtime": {
      "raw_description": "Mono Unity IL2CPP (May  5 2022 13:24:20)",
      "type": "runtime"
    },

Relates to: https://github.com/getsentry/relay/issues/1264, https://github.com/getsentry/relay/issues/1171

jjbayer commented 2 years ago

@bruno-garcia what values would you like to see in os.name and os.version here?

bruno-garcia commented 2 years ago

In this case since we're sending runtime, we expect to receive something like: runtime.name=Mono Unity IL2CPP runtime.version=May 5 2022 13:24:20

Or alternatively we can just avoid parsing it altogether and just set: runtime.name=Mono Unity IL2CPP (May 5 2022 13:24:20) and not set the version.

@bitsandfoxes what would you say makes the most sense for Unity?

The UI might need fixing so we don't show just that Version: unkown:

image @matejminar might know where to change that. Perhaps contexts.ts?

matejminar commented 2 years ago

@bruno-garcia Component responsible for rendering OS is: https://github.com/getsentry/sentry/blob/bb42837000875ecebc4276a0d6b4a68b30375eb4/static/app/components/events/contextSummary/contextSummaryOS.tsx

and for runtime this one: https://github.com/getsentry/sentry/blob/816acaa36cffc042f7f0434434882e9232805ee2/static/app/components/events/contextSummary/contextSummaryGeneric.tsx

Happy to help with any adjustments.

bitsandfoxes commented 2 years ago

In this case since we're sending runtime, we expect to receive something like: runtime.name=Mono Unity IL2CPP

I'd advocate for setting the runtime.version to the Unity editor version (i.e. Unity 2019.4.38f1). Since it's built-in it's not like users have control over which IL2CPP version they use. Everything relates back to "Which version of Unity did you use?" regardless.

jan-auer commented 2 years ago

@bitsandfoxes could you send that information from the client instead, or is that a separate runtime context entry? You can also have two runtime contexts. From the IL2CPP information above, we'll not be able to retrieve the unity version.

If it's a separate runtime, it can still make sense to separate name and version during ingestion.

bruno-garcia commented 2 years ago

With that version of Unity a user could be using Mono or IL2CPP so Runtime could reflect that. But I do agree the version here is borderline useless and the Unity version is a lot more useful