id | title | sidebar_label |
---|---|---|
add_stats_logger |
Stats Logging |
Stats Logging |
Stats logging is used for monitoring and measuring the performance of an application or system. Querybook provides the support to collect metrics by adding your own stats logger, like StatsD. Here are the metrics we currently added:
- Number of active users
- Number of API requests
- Latency of API requests
- Number of websocket connections
- Number of sql session failures
- Number of scheduled system task failures
- Number of scheduled datadoc failures
- Latency of Redis operations
- Number of query executions
Update STATS_LOGGER_NAME
in the querybook config yaml file with the logger name you'd like to use.
STATS_LOGGER_NAME: ~
If you'd like to actually use this feature, you need to create your own stats logger and add it as a plugin.
- Locate the plugin root directory for your customized Querybook, and find the folder called
stats_logger_plugin
. - Add your stats logger code similiar to the builtin loggers, like
ConsoleStatsLogger
, which means making sure it inherits fromBaseStatsLogger
and implements the abstract methods. - Add the new stats logger in the variable
ALL_PLUGIN_STATS_LOGGERS
understats_logger_plugin/__init__.py