sourcegraph / appdash

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

InfluxDBStore: use Continuous Queries to make the Dashboard very responsive #158

Closed slimsag closed 8 years ago

slimsag commented 8 years ago

This change uses Continuous Queries to downsample our span data in such a way as to make the Dashboard page very responsive even when there are a large number of spans being stored.

Fixes #141

Based on #157 for simplicity.

keegancsmith commented 8 years ago

Very fancy! InfluxDB looks pretty damn cool. Two questions:

Otherwise code and idea LGTM

slimsag commented 8 years ago

These are good questions.

Can this change have any test coverage (or is it covered by existing tests)

Currently there are no tests for the Aggregate method at all, and I agree we should add them. For this I've filed https://github.com/sourcegraph/appdash/issues/160 in an effort to not block this PR. I have done extensive testing locally and everything does work, so I'm confident this is a clear improvement. Let's invest in these tests soon.

What happens if no events happen in a minute? (ie does everything work as expected)

I did test this case locally as well, and can confirm it does. In specific, InfluxDB handles any query on a non-existing measurement (table) by returning no results, thus hitting this case https://github.com/sourcegraph/appdash/pull/158/files#diff-b7da646763ca1f5622f8d108c536ce86R295

slimsag commented 8 years ago

Merged into master.