> how to configure the annotation
I'd say that's a kubernetes question, not a prometheus question.
From the prometheus point of view: first you work out what exactly it is you're trying to scrape (pods, services etc). Then you read in a list of those entities using kubernetes_sd. Then you have some rewriting rules to convert the metadata/labels/annotations into __address__ and __metrics_path__. That's it.
You say you have multiple containers in the same pod which need scraping separately. I don't think Kubernetes exposes metadata at the container level, only the pod level. Some options you could consider:
1. Create separate scrape jobs (one for /perf-metrics, one for /app-metrics, one for /auth-metrics). Each job uses kubernetes_sd to get a list of suitable pods to scrape.
Or:
2. Create a separate 'service' for each container, and then use kubernetes_sd to get a list of services to scrape.
Or:
3. Looking at the kubernetes_sd
docs:
The endpointslice role discovers targets from existing endpointslices. For each endpoint address referenced in the endpointslice object one target is discovered. If the endpoint is backed by a pod, all additional container ports of the pod, not bound to an endpoint port, are discovered as targets as well.
So maybe that will work too. That will just give you a list of port numbers, so you may need to use fixed rewriting rules to map these to the correct __metrics_path__.