Querying logs and metrics with Explore
Adding Prometheus metrics to the mix is relatively simple: we just need to add a new Prometheus service while sending its logs to Loki to be aggregated (why not?). We’ll also need to configure Prometheus to scrape the metrics endpoints of our services. We already did this earlier in this book, so it should be no problem for us to configure the scrapers for each service.
First, let’s add Prometheus to our Docker Compose:
    prometheus:         image: "prom/prometheus:latest"     ports:         - "9090:9090"     volumes:         - "${PWD-.}/prometheus/etc:/etc/prometheus"     command: --config.file=/etc/prometheus/prometheus-config.yaml     networks:      ...