Skip to content

Truncate message type from the start to maintain the useful type name. - #5889

Open
rbev wants to merge 1 commit into
masterfrom
pre-truncate
Open

rbev wants to merge 1 commit into
masterfrom
pre-truncate

Conversation

@rbev

@rbev rbev commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

#5881 was auto merged, this PR contains the fixes requested from review.

  • Make fields in query type required
  • Truncate type name field from the start to maintain more useful type information.

@rbev rbev changed the title Truncate message type from the start to maintain the usefull type name. Truncate message type from the start to maintain the useful type name. Sep 14, 2026
@rbev
rbev requested a review from johnsimons September 14, 2026 01:02
// an index key serving sort=message_type. This field contains a type name, so it's more useful to
// truncate from the start of the name instead of the end.
static string? TruncateTypeName(string? value) =>
value is { Length: > ColumnLengths.ShortTextLength } ? value[^ColumnLengths.ShortTextLength..] : value;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we log this as a warning?

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.

We can, but if a user reads that warning, what can they do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also if their types are this long potentially it's going to log on every single error because their namespaces are out of control everywhere.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm yeh thats true. Its something we doing that may surprise the user with no explanation. Maybe its worth something in documentation then. Also, could there be a situation where the truncation results in messages being incorrectly grouped?

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.

3 participants