mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/3947-telemetry-hook-scrape'
* origin/topic/awelzel/3947-telemetry-hook-scrape: btest/telemetry: Fix "Note compilable" typo misc/stats: Add zeek_net_timestamp_seconds telemetry/Manager: Remove variant include telemetry: Invoke Telemetry::sync() only at scrape/collection time
This commit is contained in:
commit
daa358c840
27 changed files with 386 additions and 38 deletions
|
@ -5933,6 +5933,21 @@ export {
|
|||
sum: double;
|
||||
};
|
||||
|
||||
## Telemetry sync hook.
|
||||
##
|
||||
## This hook is invoked when metrics are requested via functions
|
||||
## :zeek:see:`Telemetry::collect_metrics` and :zeek:see:`Telemetry::collect_histogram_metrics`,
|
||||
## or just before Zeek collects metrics when being scraped through
|
||||
## its Prometheus endpoint.
|
||||
## Script writers can use it to synchronize (or mirror) metrics with the
|
||||
## telemetry subsystem. For example, when tracking table or value
|
||||
## footprints with gauges, the value in question can be set on an actual
|
||||
## :zeek:see:`Telemetry::Gauge` instance during execution of this hook.
|
||||
##
|
||||
## Implementations should be lightweight, this hook may be called
|
||||
## multiple times per minute.
|
||||
global sync: hook();
|
||||
|
||||
type MetricVector : vector of Metric;
|
||||
type HistogramMetricVector : vector of HistogramMetric;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue