Skip to content

Improve filtering of log messages when there are duplicate attributes#3881

Merged
JamesNK merged 1 commit intomainfrom
jamesnk/message-filtering
May 10, 2024
Merged

Improve filtering of log messages when there are duplicate attributes#3881
JamesNK merged 1 commit intomainfrom
jamesnk/message-filtering

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented Apr 23, 2024

Fixes #3614

Log entries have built-in fields. e.g. the message body, level, category, etc. Log entries also have custom fields. This is from structured data about a message.

It's possible for these to conflict. Structured data could be called Message or Category. If the user then asks to filter with the Message value, which is used? A conflict is created and it's only possible to filter the built-in fields.

This PRs fix is to give custom built-in fields an internal name, e.g. log.message. That is much less likely to conflict with real structured data.

Also, I added a divider (disabled select item with text -) between built-in fields and structured data fields to make the UI experience a bit better:

image

Microsoft Reviewers: Open in CodeFlow

@JamesNK
Copy link
Copy Markdown
Member Author

JamesNK commented Apr 27, 2024

Review please 🙏

_parameters =
[
.. knownFields,
new SelectViewModel<string> { Id = null, Name = "-" },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there not a better way to create a separator with this control?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@JamesNK JamesNK force-pushed the jamesnk/message-filtering branch from 6ae4554 to ca0275d Compare May 10, 2024 02:04
@JamesNK JamesNK enabled auto-merge (squash) May 10, 2024 02:07
@JamesNK JamesNK merged commit 68e36e4 into main May 10, 2024
@JamesNK JamesNK deleted the jamesnk/message-filtering branch May 10, 2024 02:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Message column duplicates if Attributes contains Message.

2 participants