RHGitaly: avoid logging all metadata
Logging all invocation metadata is verbose and contains secrets (authentication header). Of these, only the `correlation_id` is interesting to us at the moment. To achieve this, we split the service method with an inner method taking the inner request and the correlation id. Only the inner method is now instrumented. This is heavy for the implementation. We tried not to split, using the `fields` modifier like this: ``` #[instrument(skip(self, request), fields(request = request.get_ref()))] ``` and it ended up giving "`RepositoryRequest` does not implement tracing::Value`" The splitting will be good enough for now.
parent
dee21e96
No related branches found
No related tags found
Showing
- rust/rhgitaly/src/lib.rs 1 addition, 0 deletionsrust/rhgitaly/src/lib.rs
- rust/rhgitaly/src/metadata.rs 10 additions, 0 deletionsrust/rhgitaly/src/metadata.rs
- rust/rhgitaly/src/service/commit.rs 18 additions, 4 deletionsrust/rhgitaly/src/service/commit.rs
- rust/rhgitaly/src/service/repository.rs 17 additions, 3 deletionsrust/rhgitaly/src/service/repository.rs
- rust/rhgitaly/src/streaming.rs 6 additions, 1 deletionrust/rhgitaly/src/streaming.rs
Loading
Please register or sign in to comment