Prometheus and deploy annotations

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:

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?


I am also facing the same issue with prometheus query for some latency related metrics.
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.