Custom metrics API
Send a custom metric with one HTTP request
There is nothing to install. POST JSON to the API with your API key and the metric appears in your dashboard - created automatically the first time you send it, if you ask it to.
curl
One request, one value:
curl -X POST https://easy-obs.com/api/metric/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metric": "signups", "value": 1, "auto_create": true}'
Python
import requests
requests.post(
"https://easy-obs.com/api/metric/",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"metric": "signups", "value": 1, "auto_create": True},
timeout=5,
)
JavaScript
await fetch("https://easy-obs.com/api/metric/", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ metric: "signups", value: 1, auto_create: true }),
});
Metrics, logs and traces in one request
The batch endpoint takes any mix of the three, so a service can report everything in a single call:
curl -X POST https://easy-obs.com/api/ingest/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metrics": {"metrics": [{"metric": "checkout_ms", "value": 182}], "auto_create": true},
"logs": {"logs": [{"message": "Checkout completed", "level": 4, "app": "shop"}]},
"traces": [{"start": "2026-01-01T12:00:00Z", "end": "2026-01-01T12:00:00.182Z", "text": "checkout"}]
}'
What you get
- Each metric is rolled up automatically into minute, hour, day, month and year totals - count, sum, mean, minimum, maximum and more
- Charts, a searchable log view with levels, and trace flame charts
- Derived metrics: combine metrics with an expression, such as a ratio of errors to requests
- Optional distinct counts, for example unique user ids
- Pay in credits - each level of a metric is 15 to 75 credits a month, and you start with 10,000 free
Good to know
Metrics are identified by name and have no tags or labels, alerts watch metrics only (not logs or traces yet), and nothing is collected automatically - you send what you want to measure. An API key is shown in the app, and can be rotated at any time.
Questions, answered
How do I send data?
The REST API has endpoints for each of /logs/, /metrics/ and /traces/, and it also has a multi-endpoint for sending all three types in one request - ideal for a post-request hook.
What are minute, hour, day, month and year levels?
Each metric is rolled up automatically into totals per minute, hour, day, month and year - count, sum, mean, minimum, maximum and more - and you choose which levels to keep and for how long. What sets the price is the levels you keep and for how long - each level is priced separately and they are added up. A level costs 15 to 75 credits a month when kept for its default (minute 1, hour 7, day 30, month 365, year 3,650 days) - finer levels hold more data, so they cost more - and in proportion to that for more or fewer days: minutes kept 3 days is 225 credits a month, hours kept 14 days is 60 credits a month.
Can I try it without signing up?
Yes - choose "Continue as guest" when you open the app. A guest account starts with 1,000 credits and is deleted, with everything in it, after 24 hours. Create an account to keep your data and to buy more credits.