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

Implement Tracing #74

Open
grod220 opened this issue Jul 1, 2024 · 0 comments
Open

Implement Tracing #74

grod220 opened this issue Jul 1, 2024 · 0 comments
Labels

Comments

@grod220
Copy link
Contributor

grod220 commented Jul 1, 2024

Given we don't want to use any form of telemetry, debugging user issues sometimes feels like a shot in the dark. One thing that can assist with this is implement opt-in tracing to log (and maybe capture the stack?) as different actions are performed in the extension.

Given straight logging could pollute the user's console, this should be something that requires an explicit opt-in. A potential pattern we could extend is the SCT divergence check that can be enabled by globalThis.ASSERT_ROOT_VALID = true which gets detected in the block processor.

I think there are a few high priority areas where logging could help illuminate issues and give clarity to the lifecycle of the extension:

  • Block processing
  • Service worker lifecycle (services starting up and initiating)
  • RPC requests + responses

We should be mindful that enabling the tracing for debugging does not leak any user data but just console.log actions being taken. Example output:

globalThis.TRACING = true

Requesting block 353213
Decrypting block
Incoming BlockHeightRequest
BlockHeightResponse sent back to client
Service worker services error: XYZ
Service worker restarting services

Should explore libraries that could help with this or handrolling a solution ourselves.

@grod220 grod220 added the infra label Jul 1, 2024
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Labs web Jul 1, 2024
@grod220 grod220 moved this from 🗄️ Backlog to 📝 Todo in Labs web Jul 8, 2024
@grod220 grod220 moved this from 📝 Todo to 🗄️ Backlog in Labs web Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🗄️ Backlog
Development

No branches or pull requests

1 participant