-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Info PromQL function prototype #598
base: main
Are you sure you want to change the base?
Conversation
f313af0
to
bb08324
Compare
Just to get us all on the same page: This is just a proof of concept. Should we decide to implement this approach for real, what we want as the final result is what I have described in the design outline. The PoC makes the following concessions to simplify the implementation:
The real implementation needed to maintain additional data records to tracks all known info metrics at a given timestamp together with the information which of their labels are identifying labels and which are data labels. Note that this additional information isn't readily available from exposition formats and the remote write protocol right now. See details in the design outline. In short:
Therefore, more work than just implementing the info function in Prometheus is needed. Protocols need to be extended for full support. However, ingestion into Prometheus could be configured to mark specific metrics and specific subset of their labels as info metrics and their identifying labels. That would be a somewhat laborious process, as it had to be customized to specific classes of targets. (For example, you could configure the scrape of kube-state-metrics to identify |
/cc @SuperQ as the comment above extends on our discussion on Slack. |
bb08324
to
bb8d75b
Compare
bb8d75b
to
5b1a4dd
Compare
45fbb57
to
72ff3a0
Compare
72ff3a0
to
c8e553c
Compare
48d7701
to
0a08808
Compare
c0629fe
to
a8958ae
Compare
23afb28
to
a7fa7bf
Compare
a7fa7bf
to
d630bdc
Compare
p.mtx.Lock() | ||
defer p.mtx.Unlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to hold the mutex for the first part where you're separating labels info identifying/data.
44dd937
to
957dbb6
Compare
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
957dbb6
to
0bd897d
Compare
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Prototype of
info
PromQL function. The implementation looks up info metrics, with the right identifying labels and time range, in the TSDB.NB: I use
ValueTypeVector
for the "label-selector" argument toinfo
, but that's just a quick/imperfect hack, and we should probably have a dedicatedValueTypeLabelSelector
that doesn't indicate the argument being for selecting an instant vector. Also see Beorn's comment below on the context of this prototype.Screenshot of example usage:
TODO: