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

feat(log): log http requests for OCI and docker based on trace level by injecting a logger #1117

Conversation

jakobmoellerdev
Copy link
Contributor

What this PR does / why we need it

it is now possible to inject a trace attribute to OCMs logging architecture to allow tracing back HTTP calls for oci registries and the docker client:

ocm --logkeys /+ocm/oci=trace [YOUR COMMAND INTERACTING WITH OCI HERE]

Note that this does not take care of all access types yet because we dont have a unified http.Client.

Note that it is now also possible to pass /+ocm/docker=trace to enable logging for the docker client infrastructure, or set --loglevel=trace to get a full tracelog with HTTP statements.

Authorization Headers are redacted

Which issue(s) this PR fixes

it is now possible to inject a trace attribute to OCMs logging architecture to allow tracing back HTTP calls for oci registries and the docker client:

```
ocm --logkeys /+ocm/oci=trace [YOUR COMMAND INTERACTING WITH OCI HERE]
```

Note that this does not take care of all access types yet because we dont have a unified http.Client
@jakobmoellerdev jakobmoellerdev requested a review from a team as a code owner November 20, 2024 18:03
@jakobmoellerdev jakobmoellerdev added kind/feature new feature, enhancement, improvement, extension and removed chore labels Nov 20, 2024
@jakobmoellerdev jakobmoellerdev changed the title chore: log http requests on trace level by injecting a logger feat: log http requests on trace level by injecting a logger Nov 20, 2024
@jakobmoellerdev jakobmoellerdev changed the title feat: log http requests on trace level by injecting a logger feat(log): log http requests on trace level by injecting a logger Nov 20, 2024
@github-actions github-actions bot added the chore label Nov 20, 2024
@jakobmoellerdev jakobmoellerdev changed the title feat(log): log http requests on trace level by injecting a logger feat(log): log http requests for OCI and docker based on trace level by injecting a logger Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature new feature, enhancement, improvement, extension size/m Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant