-
Notifications
You must be signed in to change notification settings - Fork 407
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
fetch_snapshots_overview not implemented for FileStore - support or warn if not supported #470
Comments
Yeah, @OsamaSayegh can we hide the link if the user has no access to the feature? |
@SamSaffron if the user can see the speed badge, they should be able to access the snapshots page (snapshots page uses the same authorization logic as the speed badge). I think the problem here comes from the fact that requests made by admins/authorized users (i.e. users who get the speed badge) are excluded from snapshots sampling, but I think @adambair found this unexpected and was confused by it. My reasoning behind this design decision was that admins already see profiling data via the speed badge on every request they make, so they can spot/notice slow stuff without needing their requests to be sampled. But I guess if people find this behavior confusing, I'm happy to change it. For now, I'll include requests from all users in sampling when in development env only so it becomes easier to debug/configure snapshots sampling. @adambair which store were you using when you got the |
I also found this confusing, and it too took me a while to figure out the FWIW I wanted this so I could tag requests with custom fields and see those in the snapshots. As far as I understand, these fields won't show up in the speed badge (which would be helpful in order to differentiate GraphQL requests for example, which all go to the same URL). |
@ivanyv Glad I'm not the only one, was worried there for a sec ;) @OsamaSayegh I'm not sure as it was a while ago but I believe I was trying to follow the defaults in the docs so it was likely FileStore. Though I did try MemoryStore and RedisStore and didn't have much success (though it could have been for other reasons). |
There are two possible resolutions, we will accept a PR for either or both:
|
Clicking on 'snapshots' takes you to
http://localhost:3000/mini-profiler-resources/snapshots
which has this error:I read through the docs and couldn't figure out why it wasn't working. I tried Memstore, Redis, Filestore... it wouldn't produce an error with the alternative stores but would instead say "no snapshots exist". I was pretty confused as I could see the snapshots on the filesystem and in Redis.
After poking around the repo and code for a bit I stumbled upon this comment #459 (comment) which indicates that snapshots won't work for the user viewing the page if they have permissions to view the performance information...
I understand this for production situations but when testing locally it would be nice to be able to see previous snapshots in the UI. An alternative is to update the docs to call out this caveat to save folks some time with troubleshooting. Perhaps hide the 'snapshots' button if it's not available... or if there are no snapshots to show.
I understand this is a newer feature. I just didn't see anything about this situation so I figured I'd post something about it.
The text was updated successfully, but these errors were encountered: