Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flamegraph path to response headers #601

Merged
merged 2 commits into from Feb 14, 2024

Conversation

soberstadt
Copy link
Contributor

The motivation for this is to enable easy access to the flamegraph when using the async-flamegraph action. Currently, if you have a CURL request that you want to profile, you have to add the pp=async-flamegraph query parameter to the request, then copy the first ID from the X-MiniProfiler-Ids header, then add that ID to the /mini-profiler-resources/flamegraph?id= path in the browser. This assumes that you know that the current request profile id is the first one in the X-MiniProfiler-Ids header (personally, I was not confident of this until I read the source code) and that you know the path to the flamegraph endpoint.

I originally added the protocol, host, and port to the path, but I didn't know if that was guaranteed to be correct in all cases, so I removed it. If anyone else has a preference for this, I would be happy to hear it!

The motivation for this is to enable easy access to the flamegraph
when using the async-flamegraph action. Currently, if have a CURL
request that you are wanting to profile, you have to add the
`pp=async-flamegraph` query parameter to the request, then copy the
first ID from the `X-MiniProfiler-Ids` header, then add that ID to the
`/mini-profiler-resources/flamegraph?id=` path in the browser.
This assumes that you know that the current request profile id is the
first one in the `X-MiniProfiler-Ids` header (personally I was not
confident of this until I read the source code) and that you know the
path to the flamegraph endpoint.

I originally added the protocol, host, and port to the path, but I
didn't know if that was guaranteed to be correct in all cases, so I
removed it.
@SamSaffron
Copy link
Member

this does feel right to me! thanks

@SamSaffron SamSaffron merged commit 263f0d8 into MiniProfiler:master Feb 14, 2024
@soberstadt soberstadt deleted the framegraph-path-header branch February 14, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants