question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Better trace page search

See original GitHub issue

Requirement - what kind of business use case are you trying to solve?

We would like the ability to search for spans by tag in the trace view page.

A specific use case here is finding which span is making a certain SQL query. We already know the query, but if there are hundreds of spans in the trace, itā€™s very difficult to locate the corresponding span.

Problem - what in Jaeger blocks you from solving the requirement?

The search bar on the trace view page only searches by service and operation name (https://github.com/jaegertracing/jaeger-ui/blob/master/packages/jaeger-ui/src/selectors/span.js#L65).

Proposal - what do you suggest to solve the problem or improve the existing situation?

It would be relatively simple to also search tags and logs, by adding them to the search string. However I came across two issues when experimenting with this:

  1. Some tags/logs are too big and match too many inputs. E.g. a stacktrace
  2. The fuzzy search exacerbates (1). Also, some of our tag values are hash strings (e.g. 0ca9bd1a2bfcdd3d7abdff52cb49a072) which the fuzzy search loves to match against.

Iā€™m not sure about the best solution for (1) - maybe have a way to configure tag keys to omit from search? Alternatively, require tag search to be of the form key: value (same as the homepage search feature) rather then just blindly searching all tag values against the input string.

To solve (2) I would propose either (a) removing fuzzy search (IMO itā€™s not that useful, and users who are used to chrome search are used to needing exact matching) or (b) using fuzzy search only on operation/service name and doing exact matching for tags/logs.

Any open questions to address

Questions are noted in proposal.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:9
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tiffoncommented, Jun 17, 2018

@nziebart Thanks for creating this ticket!

Great suggestions and discussion of issues / solutions.

The fuzzy search exacerbatesā€¦

I agree, fuzzy search is a bit dubiousā€¦ Seems fine to change to something better.

  1. Some tags/logs are too big and match too many inputs.

The pattern used in GMailā€™s email search seems like it would work pretty well. It starts as a simple text input which works most of the time but can be used as a more advanced search when the ā€œā–¾ā€ is clicked.

One approach would be something like the following:

screen shot 2018-06-17 at 3 57 07 am

Searching via just the top text input (not the ā€œadvancedā€ search form), would match the input string via exact substring matching against the service name, operation, or the key or value from any key:value in Tags, Process or a log message. That will probably work for most scenarios and is pretty simple.

In the form:

  • The (?) would be help icons which show help info when clicked
  • Match anything would be the same as the top text input search but with the option to use regular expressions instead of exact substring matching
  • Service and Operation match the service name and operation, respectively
  • key:value would be a logfmt based key-value search against the Tags, Process and log messages for spans
    • The AND ā–¾ would allow the user to toggle between finding spans that match all (AND) of the key:value described or at least one (OR)
  • Regular expression would allow all the entered text to be processed as regular expressions. For the key:value conditions, the key and value would be separate regular expressions
  • Match entire key:value would indicate the key:value matching must match the entire key and entire value.
    • For instance, with regular expressions enabled, the search input sql(.query)?="hello there" would match the keys sql and sql.query but not mysql or sql.params

Some benefits of the two-mode approach are:

  • Most use-cases are satisfied with the single text input which has a low UI foot-print and is intuitive (same as web browsers)
  • More sophisticated use-cases are satisfied with an easy to understand UI. Itā€™s not concise, but itā€™s familiar and there is nothing to discover (aside from logfmt)

What do you think?

I was originally hoping to keep this much simpler, but conjunctions and differentiating between free-form text matching and key:value pair matching kept getting in my way. I wasnā€™t able to come up with an approach using just a single text input that had an obvious UX / syntax.

0reactions
tiffoncommented, Aug 2, 2018

@davit-y is working on this. (Iā€™m unable to assign to him.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trace Explorer - Datadog Docs
Live Search is the default view on the Traces page. Switch from Live Search to Indexed Data Search by using the time selector...
Read more >
13 Websites to Find People on the Internet - MakeUseOf
A ā€œ100% free people searchā€ service, TruePeopleSearch delivers some good results. ... Various genealogy sites can be used to trace individuals, although theĀ ......
Read more >
Global Trace Search in New Relic One: A Better Way to Work ...
Finding and using custom attributes with your traces just got a lot easier, thanks to new search capabilities built into New Relic One....
Read more >
The Trace Event Profiling Tool (about:tracing)
When diagnosing performance problems it can be valuable to see what Chrome is doing "under the hood." One way to get a more...
Read more >
Finding and viewing traces - Google Cloud
The Trace list page lets you find, and examine, individual traces in detail. You can view and inspect all spans for a trace,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found