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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timelion: Cannot escape colons in field names in the metric parameter #95954

Closed
samuelkampa opened this issue Mar 31, 2021 · 5 comments · Fixed by #96770
Closed

Timelion: Cannot escape colons in field names in the metric parameter #95954

samuelkampa opened this issue Mar 31, 2021 · 5 comments · Fixed by #96770
Labels
bug Fixes for quality problems that affect the customer experience Feature:Timelion Timelion app and visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@samuelkampa
Copy link

Kibana version: 7.9.1

Describe the bug: In Timelion, it is impossible to escape colons (which are treated as delimiters) in field names in the metric parameter. This, in turn, makes it impossible to produce certain visualizations in Timelion. By contrast, it is possible to escape colons in the q parameter, which suggests that this is a bug and not a deliberate design decision.

Steps to reproduce:

  1. Seed data with field names that contain colons (e.g., :helloworld).
  2. Write a Timelion expression with a metric parameter whose value contains a field name with a colon, and watch it fail as expected (e.g., .es(index=sample*, timefield=timestamp,metric=cardinality::helloworld)).
  3. Write a Timelion expression with a metric parameter whose value contains a field name with a colon and attempt to escape colon, and watch it fail (e.g., .es(index=sample*, timefield=timestamp,metric=cardinality:\:helloworld)).

Expected behavior: You should be able to use the \ character to escape colons (and prevent splitting) in the metric parameter, just as you can use the \ character to escape colons in q parameter.

Screenshots (if relevant):

Screen Shot 2021-03-31 at 11 27 30 AM

Any additional context: This bug was originally reported almost 3 years ago (#22113). Possible solutions were entertained, but it appears that no solution was implemented.

@samuelkampa samuelkampa added the bug Fixes for quality problems that affect the customer experience label Mar 31, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 31, 2021
@stratoula stratoula added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Apr 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 5, 2021
@stratoula stratoula added the Feature:Timelion Timelion app and visualization label Apr 5, 2021
@samuelkampa
Copy link
Author

@stratoula, any updates on this issue? I suspect it's a one- or two-line fix, and it would solve a major business need for our organization.

@stratoula
Copy link
Contributor

Hey @samuelkampa, we will look into this soonish, thanx for reporting it.

@timroes
Copy link
Contributor

timroes commented Apr 8, 2021

I think we can solve that a bit more simple then with an escape character. We're splitting on : here. I think as a fix, let's just split on the first : and treat everything after the first colon as the field name. That way no one needs to escape it.

@samuelkampa
Copy link
Author

@timroes Makes sense to me. Thanks @stratoula and @timroes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Timelion Timelion app and visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants