Monitoring¶
Data for monitoring¶
We are currently processing several types of events for monitoring:
request (any http request)
error (failed http request)
Every event is a point in the time series. The point is represented as union of the following data:
series name
start event time
tags, indexed data in storage, dictionary: keys - string tag names, values - string, integer, float
fields, non indexed data in storage, dictionary: keys - string tag names, values - string, integer, float
Monitoring series¶
Requests series.
Triggered on every request. Each point contains a data about corresponding request (execution time and etc).
Requests series tags¶ tag name
description
service
always “luna-builder”
route
concatenation of a request method and a request resource (POST:/sdk)
status_code
http status code of response
Requests series fields¶ fields
description
request_id
request id
execution_time
request execution time
Errors series.
Triggered on failed request. Each point contains error_code of luna error.
Errors series tags¶ tag name
description
service
always “luna-builder”
route
concatenation of a request method and a request resource (POST:/sdk)
status_code
http status code of response
error_code
Luna Platform error code
Errors series fields¶ fields
description
request_id
request id
Database¶
Monitoring is implemented as data sending to an influx database. You can setup your database credentials in configuration file in section “monitoring”.
Plugins¶
You can implement your own plugin for sending monitoring data. See plugins
Module request monitoring plugin example
- class crutches_on_wheels.cow.plugins.plugin_examples.request_monitoring_plugin_example.BaseRequestMonitoringPlugin(app)[source]¶
Base class for requests monitoring.
- class crutches_on_wheels.cow.plugins.plugin_examples.request_monitoring_plugin_example.RequestMonitoringPlugin(app)[source]¶
Example plugin sends a request data for monitoring to third-party source. Only one instance of this class exist during the program execution.