# Prometheus 3.5 LTS — хранилище метрик. Метрики приложения приходят PUSH через Collector на OTLP receiver # (--web.enable-otlp-receiver); метрики самих компонентов наблюдаемости — обычный scrape. global: scrape_interval: 10s evaluation_interval: 10s # правила алертов/записи проверяются каждые 10 с # Ресурсные атрибуты OTel → labels каждой серии (иначе они только в target_info). # service.instance.id — низкокардинальный: число реплик × перезапуски (случайный alias процесса). otlp: promote_resource_attributes: - service.name - service.namespace - service.instance.id - deployment.environment.name translation_strategy: UnderscoreEscapingWithSuffixes # http.server.request.duration → http_server_request_duration_seconds storage: tsdb: out_of_order_time_window: 10m # повторная отправка Collector после восстановления backend rule_files: - /etc/prometheus/rules/*.yml scrape_configs: - job_name: prometheus static_configs: [{targets: ['localhost:9090']}] - job_name: otel-collector # otelcol_*: принято/отклонено/отправлено/очереди экспортёров static_configs: [{targets: ['otel-collector:8888']}] - job_name: loki static_configs: [{targets: ['loki:3100']}] - job_name: tempo static_configs: [{targets: ['tempo:3200']}] - job_name: grafana static_configs: [{targets: ['grafana:3000']}]