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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show inlay hints when irregular event property names call for non-obvious syntax #1855

Closed
nblumhardt opened this issue May 31, 2023 · 0 comments

Comments

@nblumhardt
Copy link
Member

Seq places no constraints on what characters can appear in an event property name. For example, Environment, deployment.environment, deployment environment, and 馃 are all valid event property names.

Seq does however place constraints on what names are valid to use as-is in searches and queries. For example,

Environment = 'Staging'

is a valid query language filter, but:

deployment environment = 'Staging'

is not, because spaces cannot appear in identifiers.

This gets a little trickier when identifiers are snippets of apparently valid syntax; for example:

deployment.environment = 'Staging'

appears to be a valid filter - and it is - but rather than test the value of a property called deployment.environment, the filter checks the environment sub-property of the deployment property, which is a subtle distinction to communicate.

The user typing this probably means:

@Properties['deployment.environment'] = 'Staging'

In 2023.2, rather than force users to find this out through trial and error, any property whose name is not valid query language syntax will be accompanied by an inlay hint, showing the full syntax for the property:

image

It's not critical that the entire hint is shown; it may be trimmed if it overflows into the property name. The important thing is to signal to the user that a property requires special handling.

Seq will continue to automatically use the correct escaping when generating filters through the tick/cross menu.

@nblumhardt nblumhardt added this to the 2023.2 milestone May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant