Overview
The SigNoz Stats API returns telemetry statistics: row counts and last-observed timestamps for traces, logs, and metrics. Use it to programmatically confirm that data is being ingested, build ingestion health checks, or surface storage stats in an external dashboard.
The endpoint is always available. Stats are collected on each request and need no feature flag or configuration change, so the endpoint responds regardless of whether usage analytics reporting is enabled.
API Endpoint
GET https://<your-signoz-host>/api/v1/stats
Replace <your-signoz-host> with your instance host, e.g., example.signoz.io.
Prerequisites
- Access level: The endpoint requires at least the
VIEWERrole, the minimum role in SigNoz. No admin or editor privileges are needed to read stats. - API key: To call the API with a key, go to Settings → Service Accounts in SigNoz, create a service account, and generate an API key from its Keys tab. See Service Accounts for step-by-step instructions. Admins can create API keys by default. Any other user can do so through a custom role granting the
factor-api-key:createandserviceaccount:attachtransactions. See the Transactions Reference.
Authentication
The endpoint accepts either of the following credentials:
-
API key, passed in the
SIGNOZ-API-KEYheader (recommended for scripts and external integrations):SIGNOZ-API-KEY:<your-api-key> -
Session token, a bearer token issued to a signed-in user, passed in the
Authorizationheader:Authorization: Bearer <your-session-token>
Either credential must map to a user or service account with at least the VIEWER role.
Example Request
curl -H "SIGNOZ-API-KEY: <your-api-key>" \
https://<your-signoz-host>/api/v1/statsVerify these values:
<your-api-key>: An API key for a service account with at least theVIEWERrole.<your-signoz-host>: Your instance host, e.g.,example.signoz.io.
Response
A successful request returns HTTP 200 with a JSON envelope. All statistics are nested under the top-level data object as a flat key-value map; status is "success".
{
"status": "success",
"data": {
"telemetry.traces.count": 4821934,
"telemetry.traces.last_observed.time": "2026-06-18T09:14:22.350011Z",
"telemetry.traces.last_observed.time_unix": 1781774062,
"telemetry.logs.count": 19384726,
"telemetry.logs.last_observed.time": "2026-06-18T09:14:25.483198924Z",
"telemetry.logs.last_observed.time_unix": 1781774065,
"telemetry.metrics.count": 73650281,
"telemetry.metrics.last_observed.time": "2026-06-18T09:14:20Z",
"telemetry.metrics.last_observed.time_unix": 1781774060,
"telemetry.metrics.k8s.exists": true,
"telemetry.metrics.system.exists": true
}
}Telemetry statistics
| Key | Type | Description |
|---|---|---|
telemetry.traces.count | integer | Number of trace (span) rows currently in storage. |
telemetry.traces.last_observed.time | string | Timestamp of the most recent trace, in UTC (RFC 3339, with fractional seconds). |
telemetry.traces.last_observed.time_unix | integer | Timestamp of the most recent trace, as a Unix epoch (seconds). |
telemetry.logs.count | integer | Number of log rows currently in storage. |
telemetry.logs.last_observed.time | string | Timestamp of the most recent log, in UTC (RFC 3339, with fractional seconds). |
telemetry.logs.last_observed.time_unix | integer | Timestamp of the most recent log, as a Unix epoch (seconds). |
telemetry.metrics.count | integer | Number of scalar metric sample rows currently in storage. Exponential histogram samples are stored separately and are not included. |
telemetry.metrics.last_observed.time | string | Timestamp of the most recent scalar metric sample, in UTC (RFC 3339). Rounded down to the second. |
telemetry.metrics.last_observed.time_unix | integer | Timestamp of the most recent metric sample, as a Unix epoch (seconds). |
telemetry.metrics.k8s.exists | boolean | Whether any Kubernetes metrics are present. |
telemetry.metrics.system.exists | boolean | Whether any host or system metrics are present. |
Additional statistics
The data object is an extensible flat map. Alongside the telemetry keys above, the response also includes operational statistics contributed by other SigNoz subsystems, such as:
user.count,user.count.active,user.count.pending_invite,user.count.deletedserviceaccount.count,serviceaccount.keys.countdashboard.count,savedview.count,rule.countlogs_pipeline.total.count,logs_pipeline.enabled.countalert.firing.count,alertmanager.channel.countconfig.cache.provider,config.sqlstore.provider,config.tokenizer.provider
Treat data as an open key-value map rather than a fixed schema. The exact set of keys changes across SigNoz versions, so read keys by name and tolerate additional, unknown keys.
Errors
| Status | Cause |
|---|---|
401 Unauthorized | The API key or bearer token is missing, malformed, or expired. |
403 Forbidden | The credential is valid but the identity does not have the VIEWER role. |
Error responses use the same envelope with "status": "error" and an error object describing the failure.
API Specification
The full API specification is available in the OpenAPI Reference.
Related
- Verify data ingestion: Use this endpoint to confirm traces, logs, or metrics are arriving.
- Service Accounts: Create the API key used to authenticate.