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

Empty span name list in UI with Cassandra3 storage component #1360

Closed
llinder opened this issue Oct 26, 2016 · 3 comments · Fixed by #1374 or #1392
Closed

Empty span name list in UI with Cassandra3 storage component #1360

llinder opened this issue Oct 26, 2016 · 3 comments · Fixed by #1374 or #1392

Comments

@llinder
Copy link
Member

llinder commented Oct 26, 2016

While testing the Cassandra3 storage component I noticed that the span names dropdown in the UI went from showing 10+ entries to 0. Running the same CQL statement through cqlsh shows that there are over 1000 records with blank span names. This appears to be causing the UI to no longer show any span names after a period of time.

/cc @michaelsembwever

@michaelsembwever michaelsembwever self-assigned this Oct 27, 2016
@michaelsembwever
Copy link
Member

michaelsembwever commented Oct 27, 2016

Span names in the Cassandra3 storage are stored within the trace_by_service_span table. The manual denormalisation of the span name list to a separate table no longer exists, instead it is implicitly denormalised via a materialized view to the trace_by_service table.

The UI calls store.getSpanNames(serviceName) for a given serviceName and this does the cql query: SELECT span_name FROM trace_by_service where service_name = '<service_name>' LIMIT 100;

The materialized view doesn't actually need to store blank span_names (the origin table trace_by_service_span does though). Unfortunately materialized views can not yet filter out non-blank strings yet, they can only filter out the non-nulls.

The only approach valid that I can see is to filter out blank span_names at runtime time in the cassandraSpanStore.getSpanNames(serviceName) method. This is a shitty solution, but I suspect it'll be better solved in future C* versions.

(( It might also be worth investigating performance differences when the bucket cluster key in the materialized view is defined after the span_name clustering key. ))

@llinder
Copy link
Member Author

llinder commented Oct 27, 2016

Another problem with the materialized view is that it doesn't return a distinct list of span names. In other words it would have the same problem with non blank span names in that it will only return the first N which might not include all of the non blank names either.

My quick solution was to just create another table to hold service_name and span_name like the Cassandra2 storage component. This kind of defeats the purpose of this experimental storage implementation but at least it still enables duration and text search on annotations.

llinder added a commit to llinder/zipkin that referenced this issue Oct 31, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix openzipkin#1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
@michaelsembwever
Copy link
Member

Another problem with the materialized view is that it doesn't return a distinct list of span names. In other words it would have the same problem with non blank span names in that it will only return the first N which might not include all of the non blank names either.

That's correct. The suggestion was to ensure you included enough non-blank names.

The manual denormalisation over a materialized view works around the limitation nicely though, will check it out.

llinder added a commit to llinder/zipkin that referenced this issue Nov 2, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix openzipkin#1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
llinder added a commit to llinder/zipkin that referenced this issue Nov 3, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix openzipkin#1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
codefromthecrypt pushed a commit that referenced this issue Nov 4, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix #1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
michaelsembwever pushed a commit that referenced this issue Nov 6, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix #1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
- update stress profiles for new span_name_by_service tables

references:
 - #1392
 - #1360
 - #1374
codefromthecrypt pushed a commit that referenced this issue Nov 6, 2016
- This switches span name and service name lookups to use a table instead of a materialized view.  This change will fix #1360
- Change limit logic to limit on a set of trace IDs instead of limiting on the provided collection first. In pracitce this didn't make a noticiable difference in the results but it seems like the intended logic.
- update stress profiles for new span_name_by_service tables

references:
 - #1392
 - #1360
 - #1374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants