-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
hook scrubber as logrus formatter #17781
Conversation
b20baf4
to
3b3d5b8
Compare
@csweichel Is it fine to replace https://github.com/gitpod-io/gitpod/blob/main/components/common-go/log/redact.go with scrubbing or better in another PR? |
8e46e34
to
a21e6ca
Compare
I moved general improvements to scrubber into #17934 to unblock https://github.com/gitpod-io/gitpod-dedicated/pull/1332 |
39fc74c
to
26572ee
Compare
26572ee
to
ab625df
Compare
ab625df
to
a7fca6c
Compare
4da0878
to
10c6745
Compare
54a3dd2
to
3e6cb58
Compare
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 5354466990
|
3e6cb58
to
2040b24
Compare
/unhold |
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.
Awesome work iterating on this and getting it through.
Description
We reconsidered approach and decided to redact all nested properties if they don't implement
Scrubbable
interface.Previous attempt
I tried first to scrub before formatting and wasted too much time tuning scrubbing itself (although did fix some cases). But it turned out that scrubbing mutates data as for now, so we have to make the deep copy otherwise it breaks for instance startup of image build and public api. So I went for JSON formatting first and then scrubbing of JSON. It implies though additional unmarshalling/marshalling. It makes logging 2-3x times slower. I am not sure we should invest more time in tuning since benchmarking still shows that on average for complex data structures it takes 10000 ns.I also explored using logurs hooks, but they don't have impact on the control flow, see [1]
Related Issue(s)
fix SID-285
How to test
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
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
/hold