Add event fields as attributes in DDG log format by PSeitz · Pull Request #6549 · quickwit-oss/quickwit · GitHub
Skip to content

Add event fields as attributes in DDG log format#6549

Open
PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:logs_format
Open

Add event fields as attributes in DDG log format#6549
PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:logs_format

Conversation

@PSeitz

@PSeitz PSeitz commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

This allows us to do some aggregations on our logs (instead of using metrics)

Example Log

This is an example log from coalescing.

Screenshot 2026-06-24 at 11 28 42

This allows aggregations, e.g. on which fields we coalesced over time. Other nice infos would be e.g. published split size over time, etc.

screenshot_ddg

@PSeitz PSeitz requested a review from a team as a code owner June 25, 2026 08:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1039a6dffe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +166 to +167

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve % string fields as strings

When a field is logged with %, tracing records the display wrapper through record_debug as well, so this branch re-parses display-rendered strings like payload=%json_text whenever the text starts with a valid JSON object or array. That makes DDG attributes change type based on their contents, unlike the JSON formatter and unlike record_str, which can break facets/queries for any % string field that sometimes contains JSON-looking text.

Useful? React with 👍 / 👎.

Comment on lines +166 to +167

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep debug-sampled fields type-stable

This also parses arbitrary Debug output that merely looks like a JSON container. Existing log fields such as index_ids = ?PrettySample::new(&index_ids, 5) in quickwit-index-management/src/index.rs:331 render as a valid JSON array while the sample is not truncated, but render as a non-JSON string once and N more is appended, so the same DDG attribute flips between array and string depending only on list length; that makes Datadog facets/queries inconsistent for those logs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant