Execute Telemetry events for queries
Closed this issue · 3 comments
whatyouhide commented
Broken out from #138.
-
[:xandra, :server_warning]
- when the server returns a warning in a frame (#247)- Measurements:
message
- warning message
- Metatata:
connection
- PID of the connectionconnection_name
- name of the connection ornil
host
port
- Measurements:
-
[:xandra, :connection | :disconnection]
- when a Xandra connection process establishes a connection to the server or disconnects- Measurements:
- Metatata:
connection
- PID of the connectionconnection_name
- name of the connection ornil
host
port
- (if
:disconnection
)reason
-
[:xandra, :prepare_query]
span - when Xandra prepares or re-prepares a query- Measurements:
:system_time
(on:start
) and:duration
(on:stop
)
- Metatata:
query
-Xandra.Simple
orXandra.Prepared
queryconnection
- PID of the connectionconnection_name
- name of the connection ornil
:host
/:port
:reprepared
- boolean to tell whether this query was prepared for the first time or reprepared
- Measurements:
-
[:xandra, :execute_query]
span - when Xandra executes a query- Measurements:
:system_time
(on:start
) and:duration
(on:stop
)
- Metadata:
query
-Xandra.Simple
orXandra.Prepared
queryconnection
- PID of the connectionconnection_name
- name of the connection ornil
:host
/:port
- Measurements:
-
[:xandra, :prepared_cache, :hit | :miss]
- Xandra looked a query up in the prepared cache- Measurements
:query
-Xandra.Prepared
- Measurements
To be done by @harunzengin
jvf commented
Something I forgot to bring up: For doing throughput and latency metrics on the execute_query
event it would be nice to be able to distinguish between reads and writes. It is probably cumbersome to try to get this form the query. Maybe as a first step we could allow users to pass in a tag/label when executing a query?
whatyouhide commented
We can support an :extra_metadata
option, which we merge into the event's metadata. This way, you can add whatever you want. We do the same thing in Redix, if you want to look for inspiration 👍
whatyouhide commented
Done in #294. 💯