-
Notifications
You must be signed in to change notification settings - Fork 7
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
Background or universal debug stream? #165
Comments
I don't think it makes sense to have multiple debug streams: Hooks Builder works on a single blockchain, which has a single debug stream (filtered for specified accounts). Even now, it is possible to send SetHook in the deploy tab and see the deployment log in the test tab (when switching fast enough). Implementing a "transactions" stream different from "deploy" stream would just add complications - why shouldn't the IDE have a single debug stream? |
I didn't mean new debug stream at all!. Just having background capabilities for current one as discussed in #162 and maybe someway of summoning that from other pages! |
Thinking about it, I still can't decide whether the debug stream should update in the background - it would have its advantages, e.g. when switching to Develop too soon and not seeing the end of a test, but also problems, like using too much memory... The important thing IMHO is to show when the debug stream is or isn't updating, as described in #125. |
If e.g. the last X messages of history are stored & then older messages are pruned/spliced/.. I think the memory consumption wouldn't be terrible. Alternatively we could persist the debug stream on our side and offer a websocket command to retrieve history? |
Actually that would make it smooth for frontend, having an api endpoint to retrieve some history of logs via websocket or better a http call would be neat! |
@muzam1l Added :) https://hooks-testnet-v2-debugstream.xrpl-labs.com/recent/rDADDYfnLvVY9FBnS8zFXhwYFHPuU5q2Sk It'll return the last 30 minutes (key: timestamp) of debug messages. And just in case it makes sense at some point to auto-suggest recently active accounts when typing r...: |
That's awesome 🔥. Will start playing with it soon! |
So recents api is now implemented in main branch, therefore after opening debug stream for an account, logs are fetched and persisted even while navigating to other pages! However there seems to be slight issue with results, some of the logs are missing when retrieved from http api vs when retrieved from web-socket connection. For example: From what I figured, this seems to be issue with same timestamps (no decimals), so only one log is kept while others with same timestamp are omitted. Any ideas @WietseWind |
Like it captures all account logs be it deploy or transactions. More discussions needed.
The text was updated successfully, but these errors were encountered: