tracy
tracy copied to clipboard
request_id() in BlueScreen
When debugging complex applications I often need to pair a specific BlueScreen with a request that logs another system (for example Sentry, or one of our applications).
I use the request_id() function to tag requests, which is defined either by a specific environment or a shared package and provides a unique UUID for a specific request.
In the BlueScreen footer, it would make sense to me to verify the existence of the request_id() function, and if it returns a string, its value is displayed.
Inspiration: https://packagist.org/packages/chrisguitarguy/request-id-bundle
Thanks.
getBlueScreen()->info[] = request_id() ?
This is related to a more general problem.
Large applications use what is called a CorrelationId, which is the ID of the current request to allow you to correlate calls and logs from different sources. For example, if Tracy stores a particular log with this ID, I can correlate requests to the database, external API services, and so on, accordingly.
ID can be logged in HTML BlueScreen for example like: <!-- CorrelationId: "foo" -->.
Tracy could automatically implement a provider or interface to which the CorrelationId can be passed simply so that there is a system solution for this.
More info: https://help.mypurecloud.com/articles/find-a-correlation-id/ and https://hilton.org.uk/blog/microservices-correlation-id