Prometheus and deploy annotations

Hello!
I’m trying to get a prometheus annotation query to show annotations for deployments based on our exported build_info metric
Here’s the metric:
amplion_build_info{endpoint="http-metrics",git_commit="38efb85",instance="w.x.y.z:8005",job="dataservice",namespace="dev",pod="dataservice-blah",service="dataservice",version="20200512_175723"}

This is the query I have so far:
sum by(service, git_commit,version) (amplion_build_info{namespace="[[env]]"}) > 0

I thought it was working…but it only shows the very first deployment. I’ve tried a bunch of variants and either get nothing or an annotation every instant:)

Any ideas?
Thanks!

2 Likes

I am also facing the same issue with prometheus query for some latency related metrics.
Example:-
avg(latency{var=$value}) > 100

It is not working as expected as mentioned in the documentation.
A regular metrics query

@myan2007 One issue there is that the prometheus annotations don’t support ranges – so you’ll be marking an annotation for every moment where latency > 100.