View Source Xandra.Telemetry (Xandra v0.18.0)

Telemetry integration for event tracing, metrics, and logging.

Xandra uses telemetry for reporting metrics and events. Below we list all the possible events emitted by Xandra, alongside their measurements and metadata.

Xandra emits telemetry events since v0.15.0.

Events

For a comprehensive list of the events that Xandra emits, see the Telemetry Events page in the guides.

Summary

Functions

Attaches a handler that logs Telemetry events.

Functions

Link to this function

attach_default_handler()

View Source (since 0.15.0)
@spec attach_default_handler() :: :ok

Attaches a handler that logs Telemetry events.

This handler is useful when you want to see what's going on in Xandra without having to write a Telemetry handler to handle all the events.

These are the events that get logged. This list might change in the future.

EventLevel
[:xandra, :connected]info
[:xandra, :disconnected]warn
[:xandra, :failed_to_connect]warn
[:xandra, :prepared_cache, :hit]debug
[:xandra, :prepared_cache, :miss]debug
[:xandra, :prepare_query, :start]debug
[:xandra, :prepare_query, :stop]debug
[:xandra, :prepare_query, :exception]error
[:xandra, :execute_query, :start]debug
[:xandra, :execute_query, :stop]debug
[:xandra, :execute_query, :exception]error
[:xandra, :server_warnings]warn
[:xandra, :cluster, :change_event]debug
[:xandra, :cluster, :control_connection, :connected]debug
[:xandra, :cluster, :control_connection, :disconnected]debug
[:xandra, :cluster, :control_connection, :failed_to_connect]warn
[:xandra, :cluster, :pool, :started]debug
[:xandra, :cluster, :pool, :restarted]debug
[:xandra, :cluster, :discovered_peers]debug

Events have the following logger metadata:

  • :xandra_address - the address of the node the connection is connected to
  • :xandra_port - the port of the node the connection is connected to
  • :xandra_protocol_module - the protocol module for the Cassandra native protocol