-
Notifications
You must be signed in to change notification settings - Fork 13
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
Providing the recording as a URL query param instead of a file #3
Comments
Are we talking about WebUI ability to open remote recording? I guess it is already implemented, try The few culprits are:
Code for reference: https://github.com/gleb-sevruk/pycrunch-tracing-webui/blob/master/src/store/index.js#L184 |
I was thinking "just click https://app.pytrace.com/?data=base64_encoded_payload_here "; i.e. putting the whole recording (compressed and encoded) in the URL. No data storage at all! A similar idea would be to load the recording from a data-URL, like |
Ok, I ran a few checks. Previously I was thinking that url length limited to 32k bytes; but now Chrome states it can support up to 2MB url string (https://chromium.googlesource.com/chromium/src/+/master/docs/security/url_display_guidelines/url_display_guidelines.md#URL-Length) I tried compressing relatively small recording of 36MB, and it won't fit into limit: As I agree this feature may be useful, it will not work under all circumstances. (what should recorder do, if predicted compressed size will exceed 2MB?) Maybe it worth looking into alternatives, such as S3-compatible storage (Ceph, Minio, AWS) or just exposing artifacts from CI |
My thoughts on this are basically "can we make the data smaller", then "can we compress it better" (e.g. sorting it, canonicalising, using zstandard instead of zip, etc), and if that's too hard just tell me that the feature I want isn't practical! (in any case, my sincere thanks for an awesome open-source tool and your quick responses here 🥰) |
The obvious alternative is local recordings, so I experimented with that for a bit. My goal is to have a link which I can print to the terminal from
|
But the obvious problem is disk space |
Well, the trace has to be stored somewhere, so uploading it just moves the problem around (and is impractical for people on slow internet connections). Some combination of compressing traces and aggressively deleting old trace files would probably be sufficient. |
I'd love to be able to use pytrace to debug failures from CI... but getting files off CI and then onto my local machine before I can view them is a pain.
Would it be possible to pass this data as a URL query param instead? If so, dumping that URL in the logs would make time-travelling debugging as easy as clicking a link 🤩
The text was updated successfully, but these errors were encountered: