sentry-unity
sentry-unity copied to clipboard
feat: Auto Instrumentation for Awake
trafficstars
The idea is to start and finish spans automatically for every Awake method in all MonoBehaviour within the project.
Noticeable pitfall: Not every MonoBehaviour implements Awake.
The plan:
- [x] Hook up to the compilation pipeline to get the
Assembly-CSharp.dll - [x] Add options flag to enable/disable feature and put it on the window
- [x] Insert
Start Spanas the very first instruction - [x] Insert
Finish Spanbefore everyreturn - [x] Enable Trace Sample Rate for smoke testing
- [x] Enable Performance Auto Instrumentation for smoke testing
- [x] Smoke test looking for a
app.starttransaction - [x] Smoke test looking for
awakespan
| Messages | |
|---|---|
| :book: | Do not forget to update Sentry-docs with your feature once the pull request gets approved. |
Generated by :no_entry_sign: dangerJS against 6b08bf19fbe79456842cbee599daa3ab01ac4018
Generally looks good. Commented with some minor nits.
Didn't test it out though - I'd need more context.