fix: Profiler: use $title as key in start() so it will correctly be unset in stop()#14019
Conversation
|
OpenAPI SnapshotProject:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #14019 +/- ##
==========================================
+ Coverage 55.35% 55.38% +0.03%
==========================================
Files 2962 2962
Lines 91428 91424 -4
==========================================
+ Hits 50609 50638 +29
+ Misses 40819 40786 -33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey Daniel Schipper (@daniel-memo-ict) thanks for improving this! Let me know if you need help to finalise this |
|
Hey Daniel Schipper (@daniel-memo-ict), any news on this? |
|
Hi Daniel Schipper (@daniel-memo-ict) any update? |
|
Sorry, we're in the middle of a big project updating a client from 6.4 to 6.7, I haven't had time to update this PR yet. |
…nset in stop() (#14019) Co-authored-by: Nicolas Fortier <[email protected]> Co-authored-by: Nicolas Fortier <[email protected]>
1. Why is this change necessary?
When using
Profiler::start()andProfiler::stop()separately a LogicException will be thrown duringProfiler::cleanup()as it thinks it still has an open trace. This happens becauseProfiler::start()stores the title as a value in$openTracesbutProfiler::stop()tries to use the title as a key.2. What does this change do, exactly?
Prevents a LogicException from occuring during shutdown when using Profiler start/stop separately
3. Describe each step to reproduce the issue or behaviour.
4. Please link to the relevant issues (if any).
5. Checklist
RELEASE_INFO-6.<major>.mdunder “Upcoming” for informational changes, including the consequences of the change and how it affects external developers.UPGRADEsection inUPGRADE-6.<next-major>.mdfor breaking changes (what/why/impact/how to adapt).