Grafana Cloud

Monitor Fireworks AI deployments with the Metrics Endpoint integration

Fireworks AI exposes real-time performance metrics for on-demand deployments, such as request rate, error rate, latency, and token throughput, on a Prometheus-compatible endpoint. You can use the Metrics Endpoint integration to scrape this endpoint from Grafana Cloud without running any additional infrastructure.

For details about the endpoint and every metric it exposes, refer to Exporting Metrics in the Fireworks AI documentation.

Before you begin

You need:

  • A Fireworks AI account with at least one on-demand deployment. The endpoint doesn’t report serverless usage. For billing and usage data, refer to Exporting Billing Metrics.
  • Your Fireworks AI account ID.
  • A Fireworks AI API key for that account.

Fireworks AI limits the metrics endpoint to six requests per minute per account. Requests over the limit fail with HTTP 429 (Too Many Requests). The limit is shared by every client that reads the endpoint for your account, including any Prometheus server or OpenTelemetry Collector that you already run.

Create the scrape job

  1. In your Grafana Cloud stack, click Connections in the left-hand menu.

  2. Under Add new connection, find and select the Metrics Endpoint tile to open the integration.

  3. Create a scrape job with the following settings, making sure to replace <ACCOUNT_ID> with your Fireworks AI account ID:

    SettingValue
    Scrape job namefireworks, or any name that uses only letters, digits, dashes, and underscores
    URLhttps://api.fireworks.ai/v1/accounts/<ACCOUNT_ID>/metrics
    Scrape interval1 minute
    Authentication methodBearer
    Bearer tokenYour Fireworks AI API key. Don’t include the Bearer prefix.
  4. Test the connection.

  5. Save the scrape job.

Fireworks AI updates these metrics every 30 seconds and recommends a 1 minute scrape interval. A single scrape job with a 1 minute interval uses one of the six requests per minute that your account allows. Create only one scrape job per Fireworks AI account.

Each connection test sends two requests to the endpoint: one without credentials, to confirm that the endpoint requires authentication, and one with your API key. These requests count toward the Fireworks AI rate limit.

Check that metrics are arriving

The Metrics Endpoint integration adds a scrape_job label, set to your scrape job name, to every series it collects. Use this label to filter Fireworks AI metrics. The examples on this page use the scrape job name fireworks.

  1. In Grafana Cloud, open Explore and select your Prometheus data source.

  2. Run the following query:

    promql
    metrics_endpoint_export_response_success{scrape_job="fireworks"}

    A value of 1 means the last scrape succeeded. A value of 0 means it failed, and the status_code label shows the HTTP status code that Fireworks AI returned.

Troubleshooting

The connection test fails with an unauthorized or unsupported status code error

  • Check that the API key belongs to the account in the URL.
  • Check that the bearer token doesn’t start with Bearer.
  • If the API key is correct, another client might be using up the Fireworks AI rate limit. Wait one minute and test the connection again.

Scrapes fail with status code 429

If metrics_endpoint_export_response_success{scrape_job="fireworks", status_code="429"} returns 0, Fireworks AI is rate limiting the scrape. Remove any other scrape jobs or clients that read the same account’s metrics endpoint, and keep the scrape interval at 1 minute or longer.

Scrapes succeed but no Fireworks AI metrics appear

Fireworks AI only reports these metrics for on-demand deployments. Check that the account in the URL has at least one running on-demand deployment.