personal-lifecycle-tracker / observability / prometheus.yml
prometheus.yml
Raw
global:
  scrape_interval: 5s
  evaluation_interval: 5s

rule_files:
  - "/etc/prometheus/alert_rules.yml"

scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]

  - job_name: "otel-collector"
    static_configs:
      - targets: ["otel-collector:8888"]

  - job_name: "otel-collector-metrics"
    static_configs:
      - targets: ["otel-collector:8889"]

  - job_name: "api-backend"
    metrics_path: "/metrics"
    static_configs:
      - targets: ["personal-lifecycle-tracker-backend:8000"]
        labels:
          environment: "development"
      - targets: ["personal-lifecycle-tracker-backend-prod:8000"]
        labels:
          environment: "production"