mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
monitoring_log_requests: Improve data output
* Add environment var to enable/disable requests log * Add ability to send data to an UDP listener instead of stdout
This commit is contained in:
@@ -6,7 +6,14 @@ Monitoring: Requests Logging
|
||||
|
||||
This addon is used to output in the logs informations about the user's
|
||||
requests. Data such as *what* is the request, *who* requested it and *how
|
||||
much* time did it took to complete could then be extracted from the logs and
|
||||
much* time did it took to complete.
|
||||
|
||||
The requests logging is activated with the environment variable `ODOO_REQUESTS_LOGGING` set to `1`.
|
||||
|
||||
Data output
|
||||
###########
|
||||
|
||||
The data could then be extracted from the logs and
|
||||
loaded in an analysis tool such as ElasticSearch/Kibana.
|
||||
|
||||
Each log line is a JSON with the monitored fields, so it is easier to parse.
|
||||
@@ -15,3 +22,8 @@ The logs are prefixed with ``monitoring.http.requests`` so be sure to enable
|
||||
this path in the log handler::
|
||||
|
||||
- LOG_HANDLER=":WARNING,monitoring.http.requests:INFO"
|
||||
|
||||
It is also possible to send the data directly to an UDP listener without
|
||||
outputting anything to the logs to avoid flooding on busy instances.
|
||||
To do so, use the environment variable `ODOO_REQUESTS_LOGGING_UDP`
|
||||
set to a value like `<address>:<port>` (`address` can be an IP or a domain).
|
||||
Reference in New Issue
Block a user