Replies: 4 comments
-
@Neverlord - cc |
Beta Was this translation helpful? Give feedback.
0 replies
-
Some points from a discussion with @rsmmr:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm drafting in the telemetry branch (https://github.com/zeek/zeek/tree/topic/awelzel/telemetry-script-land-v0/scripts/base/frameworks/telemetry), but pasting a more concrete idea here.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The following PR contains the declaration and a wip implementation around |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the
telemetry.bif
API allows to retrieve instances of families and metrics when all parameters (prefix, name, labels, label values, etc.) are known.For exposing metrics through script-land (e.g to create a telemetry.log), a mechanism is required to that allows the script-layer to iterate/list/discover metrics.
Brain-storming
Listing metrics API
Currently, there are 6 different helpers to create metrics. We could have 6 different listing bifs, or opt for a more union-like /
&optional
approach.Current creation functions:
A single
__list()
bif method seems preferable.Translating between
Metric
andGauge
/Counter
may be possible, but unclear if there's actually a use-case. TheMetric
may be mostly read-only.Reading values: int vs double
The current script-layer proposal for a Telemetry framework opted to solely use
double
version as the metric data type (and hide the distinction from the user). Mostly due to Prometheus inspiration and because it makes for a simpler API.On the C++ level, the int versions may be used and script-land consumers might be interested in the difference.
Metric::get_value(m: Metric): double
that casts the resulting value to doubleMetric::get_int_value(m: Metric)
that fails if the metric isn't backed by aint
version.One motivating use-case may be a future
telemetry.log
file: If it's a simplets
,name
,value
structure, thenvalue
should probably be of typedouble
. If there isint
vsdouble
differentiation, consuming the log becomes more difficult.Beta Was this translation helpful? Give feedback.
All reactions