Any service can now be configured using [docker labels](https://docs.docker.com/config/labels-custom-metadata/).
The following example shows in docker-compose style how this looks like:
```
services:
test-metrics:
image: dummy-metrics:v1
labels:
- "prometheus.io/scrape=true"
- "prometheus.io/path=/metrics"
- "prometheus.io/extra-labels=k1:v1,k2:v2"
```
The exhaustive list of labels to configure properly your service is provided below:
| Annotation | Definition | Example |
| ---------- | ---------- | ------- |
| `prometheus.io/scrape` | Main label to ensure this container will be scraped by Prometheus. Required value is `true`. Any other value will not be considered. | `prometheus.io/scrape=true`|
| `prometheus.io/port` | Specify which port to use for the scraping. In case of a single port exposed, this configuration can be omitted. | `prometheus.io/port=8080` |
| `prometheus.io/path` | Alternative path for scraping the metrics. Default from Prometheus is `/`. | `prometheus.io/path=/metrics` |
| `prometheus.io/scheme` | Alternative scheme for scraping thee metrics. Default from Prometheus is `http`. | `prometheus.io/scheme=https` |
| `prometheus.io/extra-labels` | Any extra labels to add to the metrics scraped for this container. Comma separated key:value pairs. | `prometheus.io/extra-labels=label1:value1,label2:value2,...` |