diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2021-04-27 10:11:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 10:11:20 +0300 |
commit | e9ccc75a451f986224c5f294a74001929b4bbe97 (patch) | |
tree | 87f6d0278bec7fb36c8203ed299349d901bb81a0 /exporting/prometheus | |
parent | dc567d50761381d615554a0b48e8170a78fbb939 (diff) |
Provide more agent analytics to posthog (#11020)
* Move statistics related functions to analytics.c
* error message change, space added after if
* start an analytics thread
* use heartbeat instead of sleep
* add late enviroment (after rrdinit) pick of some attributes
* change loop
* re-enable info messages
* remove possible new line
* log and report hits on allmetrics pages. detect if exporting engines are enabled/in use, and report them
* use lowercase for analytics variables
* add collectors
* add buildinfo
* more attributes from late environment
* add new attributes to v1/info
* re-gather meta data before exit. update allmetrics counters to be available in v1/info
* log hits to dashboard
* add mirrored hosts
* added notification methods
* fix spaces, proper JSON naming
* add alerts, charts and metrics count
* more attributes
* keep the thread up, and report a meta event every 2 hours
* small formating changes. Disable analytics_log_prometheus when for unit testing. Add the new attributes to the anonymous-statistics.sh.in script
* applied clang-format
* dont gather data again on exit
* safe buffer length in snprintfz
* add rrdset lock
* remove show_archived
* remove setenv
* calculate lengths during sets
Diffstat (limited to 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/prometheus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 4222dce568..6759313c33 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -794,6 +794,9 @@ static inline time_t prometheus_preparation( time_t now, PROMETHEUS_OUTPUT_OPTIONS output_options) { +#ifndef UNIT_TESTING + analytics_log_prometheus(); +#endif if (!server || !*server) server = "default"; |