Analyzing Metrics

The Identity API gives access to metrics to let you analyze how the Identity service is operating.

Metrics Type Description
Identifier Total number of records, and a breakdown of demographics usage by identifier type.
Overlap A breakdown of how many patients have records in multiple source systems.

View the article for each metrics type for details about the endpoint, data format, etc.

Prometheus Data Source

When you provide an accept parameter of text/plain in the HTTP request header to a metrics operation, the metrics will be in a plain-text Prometheus format. You can use this feed as a Prometheus data source in Grafana or any other Prometheus-compatible tool to enable visualizations or monitoring.

Here is a sample Prometheus configuration for consuming the metrics endpoints:

  - job_name: "identifiermetrics"
    metrics_path: '/monitoring/v1/identifiermetrics'
    scheme: https
    basic_auth:
       username: bmpi
       password: 'YOUR_METRICS_API_KEY'
    static_configs:
      - targets: ["YOUR_IDENTITY_URL"]


  - job_name: "overlapmetrics"
    metrics_path: '/monitoring/v1/overlapmetrics'
    scheme: https
    basic_auth:
       username: bmpi
       password: 'YOUR_METRICS_API_KEY'
    static_configs:
      - targets: ["YOUR_IDENTITY_URL"]