-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[log] log requestId #18688
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
[log] log requestId #18688
Conversation
604eea2
to
e79d4d7
Compare
Will be good if |
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 6142495838
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, i have not tried since preview is down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but confirmed from GCP logs from last Friday https://cloudlogging.app.goo.gl/yuLzNR3yspCiJZcG7
const userId = this.clientMetadata.userId; | ||
return runWithContext( | ||
{ | ||
requestId: v4(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(out of scope here) Would be great to discuss the structure of this shape a bit, and evolbe the old "OWI" approch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should discuss our approach to tracing generally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw what does OWI stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OWI - owner workspace instance. The flat structure we use to tag logs and traces.
Was thinking in the same direction: That could be achieved here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM ✔️
e79d4d7
to
96267af
Compare
/unhold |
Description
This change will automatically add a requstId as well as the userID to any requets done through the websocket.
Summary generated by Copilot
🤖 Generated by Copilot at 604eea2
This pull request improves the logging of JSON-RPC requests from the websocket clients by adding request IDs and user IDs to the log context. It also introduces a new file
log-context.ts
that implements a global context augmenter and a helper function for running functions with the context.Related Issue(s)
Fixes EXP-590
How to test
Check the logs of server when doing requests and verify that the same unique requestId is used in all log messages per request.
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold