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

refactor: record tenant_id and request_id from header in the trace span #139

Merged
merged 6 commits into from
Dec 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor logging of key value
Chethan-rao committed Dec 24, 2024
commit 1c90bebbaeed02cbd39efa8faa200de414fd72d8
4 changes: 1 addition & 3 deletions src/logger/formatter.rs
Original file line number Diff line number Diff line change
@@ -193,9 +193,7 @@ where
map_serializer.serialize_entry(key, value)?;
} else {
tracing::warn!(
?key,
?value,
"Attempting to log a reserved entry. It won't be added to the logs"
"Attempting to log a reserved entry. It won't be added to the logs. key: {key:?}, value: {value:?}"
);
}
}
2 changes: 1 addition & 1 deletion src/logger/storage.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ impl<'a> Storage<'a> {

pub fn record_value(&mut self, key: &'a str, value: serde_json::Value) {
if super::formatter::IMPLICIT_KEYS.contains(key) {
tracing::warn!(value =? value, "{} is a reserved entry. Skipping it.", key);
tracing::warn!("{key} is a reserved entry. Skipping it. value: {value}");
} else {
self.values.insert(key, value);
}