sourcegraph / appdash

Application tracing system for Go, based on Google's Dapper.
https://sourcegraph.com
Other
1.72k stars 137 forks source link

traceapp: perform fuzzy search on all rawData keys. #20

Closed slimsag closed 9 years ago

slimsag commented 9 years ago

With this change, you can now fully strict or fuzzy search against all of the keys in the spans. A fuzzy search for e.g. "200" would turn up results properly now.

Also, we implicitly limit the filter/search string to 32 characters when fuzzy searching as Fuse is limited to that, and will raise an exception otherwise.

The tactic used for searching against all keys, is on a per-object (i.e. per-span) basis. This means there is one fuse search per span object. I also tried a single fuse search, but against the uniform (i.e. common) set of keys shared by all the objects, but not all spans share the same set of keys (and Fuse wants a strict set of keys to search against, specifically).

A more proper long-term fix for both of these would be to: modify Fuse to search all object keys (when none are specified in the options map), and make Fuse responsible for searching for patterns greater than 32 characters (whether that means slicing to 32 implicitly as we do here, or searching for every 32-byte consecutive sets in the pattern string).

Filtering the following trace:


image


For just hello (which some spans have as fake messages) produces identical results to a strict Msg:"hello" filter:


image