# Scrape service-scoped hot metrics.

> Configure Prometheus to scrape TrafficWar lifetime in-memory hot event counters and latency histograms with a service API key.

TrafficWar exposes Prometheus text format for the service pinned to an API key. The endpoint reads the ingest owner’s in-memory aggregate and does not query ClickHouse or S3 history.

## Scrape the API host



```
scrape_configs:
  - job_name: trafficwar
    scheme: https
    metrics_path: /prometheus
    static_configs:
      - targets: ["api.trafficwar.tech"]
    authorization:
      credentials: YOUR_SERVICE_API_KEY
```

## Metric families

- clickhouse_events_events_total: lifetime event counter by service, event, label, and source.
- clickhouse_events_latency_seconds: cumulative latency histogram with sum and count.

## Scope and restart behavior

The scrape is intentionally hot and owner-local. It is not a query over retained metric Parquet, and process restart can reset the lifetime in-memory series. Use the TrafficWar Metrics page for retained historical windows.

## Related

- [Move from live traffic to measurable production behavior.](https://trafficwar.tech/features/event-analytics.md)
- [Turn metric conditions into incidents and notifications.](https://trafficwar.tech/docs/alerts.md)
- [/pricing](https://trafficwar.tech/pricing.md)
