# This file was automatically generated by bifcl from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_zeek/zeek-devel/work/zeek-7.0.4/src/telemetry/telemetry.bif (alternative mode).

export {
##! Functions for accessing counter metrics from script land.

module Telemetry;


type MetricType: enum  {
    COUNTER,
    GAUGE,
    HISTOGRAM,
} ;






global Telemetry::__counter_family: function(prefix: string , name: string , labels: string_vec , helptext: string &default = "Zeek Script Metric", unit: string &default = ""): opaque of counter_metric_family ;


global Telemetry::__counter_metric_get_or_add: function(family: opaque of counter_metric_family , labels: table_string_of_string ): opaque of counter_metric ;


global Telemetry::__counter_inc: function(val: opaque of counter_metric , amount: double &default = 1.0): bool ;


global Telemetry::__counter_value: function(val: opaque of counter_metric ): double ;




global Telemetry::__gauge_family: function(prefix: string , name: string , labels: string_vec , helptext: string &default = "Zeek Script Metric", unit: string &default = ""): opaque of gauge_metric_family ;


global Telemetry::__gauge_metric_get_or_add: function(family: opaque of gauge_metric_family , labels: table_string_of_string ): opaque of gauge_metric ;


global Telemetry::__gauge_inc: function(val: opaque of gauge_metric , amount: double &default = 1.0): bool ;


global Telemetry::__gauge_dec: function(val: opaque of gauge_metric , amount: double &default = 1.0): bool ;


global Telemetry::__gauge_value: function(val: opaque of gauge_metric ): double ;




global Telemetry::__histogram_family: function(prefix: string , name: string , labels: string_vec , bounds: double_vec , helptext: string &default = "Zeek Script Metric", unit: string &default = ""): opaque of histogram_metric_family ;


global Telemetry::__histogram_metric_get_or_add: function(family: opaque of histogram_metric_family , labels: table_string_of_string ): opaque of histogram_metric ;


global Telemetry::__histogram_observe: function(val: opaque of histogram_metric , measurement: double ): bool ;


global Telemetry::__histogram_sum: function(val: opaque of histogram_metric ): double ;


global Telemetry::__collect_metrics: function(prefix: string , name: string ): any_vec ;


global Telemetry::__collect_histogram_metrics: function(prefix: string , name: string ): any_vec ;

} # end of export section
module GLOBAL;
