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 the ability to export/import an event graph for a certain timeframe #346

Open
Kingdutch opened this issue Apr 7, 2021 · 3 comments
Open
Labels
Feature New feature or request Needs more info Requires more information from reporter(s)

Comments

@Kingdutch
Copy link

About

I'm currently trying to debug what appears to be a race condition and I'm unclear where the cause is.

It would be helpful if I could export the events that were registered by the devtools so that I could add this to a bug report/support request.

That would allow another developer to see the order of events and see what's happening and what's triggering the incorrect state.

@Kingdutch Kingdutch added the Feature New feature or request label Apr 7, 2021
@andyrichardson
Copy link
Collaborator

Hi @Kingdutch 👋

Right now that isn't something that we would be looking to add support for inside of devtools; but fear not - I have a solution for you!

You can listen to debug events on the client (and export them however you want).

I'll close this for now but let me know if I'm misunderstanding the request or if you just want some help trying to catch that race condition 👍

@Kingdutch
Copy link
Author

It wasn't directly for race conditions only. It's like being able to export performance (flame) graphs in browser devtools.

It could be useful when discussing an issue to be able to view the same thing as what the reporting user is seeing. Trying to do this with screenshots and descriptions is difficult. The output from devtools makes a good timeline for what happens in Urql and the Urql cache when something goes wrong. Being able to export that allows a more knowledgeable user (e.g. an Urql maintainer or other dev) to import what happened and zoom in on the details that are important (without having to go back 'n forth to the reporting user).

@andyrichardson andyrichardson added the Needs more info Requires more information from reporter(s) label Apr 23, 2021
@andyrichardson
Copy link
Collaborator

@Kingdutch thanks for clarifying!

So if I'm getting this right, you would want to:

  • Have an option in devtools to export the complete history (which is in state)
  • Have an option in devtools to import aforementioned export and see the history in the events view

In terms of whether we would do this or not, I'm totally sure of the value and I'd guess it would be a fair amount of effort. I'll leave it open anyhow to get thoughts from others!

In the meantime, I'd say there are a fair number of alternatives:

  • writing a small exchange to write events to a file (happy to help on this)
  • exporting network events as HAR using the chrome network tab
  • providing reproduction instructions to engineers

The conversation is still open so if you have a very clear idea of how this could be done and where this provides value, fight your case 👊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Needs more info Requires more information from reporter(s)
Projects
None yet
Development

No branches or pull requests

2 participants