Log filtering cleanup and observability improvements #45
1 changed files with 11 additions and 6 deletions
Extract more fields from JSON logs (zot compatibility)
Zot uses "message" instead of "msg" for the message field. Also extract caller and repository from JSON logs for better filtering. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit
d887d4cdcb
|
|
@ -90,11 +90,15 @@ data:
|
|||
}
|
||||
|
||||
// Try to parse JSON logs (e.g., structured app logs)
|
||||
// Handle both "msg" (common) and "message" (zot) field names
|
||||
stage.json {
|
||||
expressions = {
|
||||
level = "level",
|
||||
message = "msg",
|
||||
time = "time",
|
||||
level = "level",
|
||||
msg = "msg",
|
||||
message = "message",
|
||||
time = "time",
|
||||
caller = "caller",
|
||||
repository = "repository",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -111,9 +115,10 @@ data:
|
|||
// Extract labels from parsed data (works for both JSON and logfmt)
|
||||
stage.labels {
|
||||
values = {
|
||||
level = "",
|
||||
caller = "",
|
||||
component = "",
|
||||
level = "",
|
||||
caller = "",
|
||||
component = "",
|
||||
repository = "",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue