smartcat-labs / cassandra-diagnostics

Cassandra Node Diagnostics Tools
Apache License 2.0
51 stars 6 forks source link

Influx reporter #40

Closed mgobec closed 8 years ago

mgobec commented 8 years ago

We need to differentiate update and select for this use case, so we need statement type at least to be tag (currently we are using class name). Probably statement will be for audit purpose and query type or something is "update", "Select", "delete" and we need this to be tag.

Current influx schema and Grafana presentation relies on statement to be tag, that is reason why I brought this up to have same behavior.

nivancevic commented 8 years ago

Package org.apache.cassandra.cql3.statements defines a number of statements (ModificationStatement, SelectStatement, TruncateStatement, CreateTypeStatement, DropUserStatement, SchemaAlteringStatement, RevokeStatement, etc.). Should all these statements be mapped to two 'tags'? Also, what does it mean 'tag'? An Enum value?

mgobec commented 8 years ago

tag tells influx to index the value and string values are good enough for now as UpdateStatement or SelectStatement

nivancevic commented 8 years ago

Clear. Just note that 'tags' are InfluxDB specific thing and in other reporter implementation (e.g. console reporter, or graphite reporter) there is no notion of tags.

nbozic-zz commented 8 years ago

Tags are influx specific thing, but queryType is definitely something we need and we will let specific reporter do what needs to be done with it (in this use case influx is tagging queryType in order to search and group by it).

So I think we need queryType on query, we need to tag it on InfluxQueryReporter and we need to change Grafan way of presenting/querying influx to use tag queryType.

Think also we need statement to be just field, and to have it so we can extend with audit.

mgobec commented 8 years ago

Put statementType into tag collection in SlowQueryModule

nbozic-zz commented 8 years ago

Done in #67