Every service on Hangar comes with its logs, resource metrics and HTTP requests, collected for you with nothing to install. Add an OpenTelemetry SDK and you also get traces, and alerts on error rate and latency.
All of it is on the service's own tabs: Logs, Metrics and Traces.
Logs
The Logs tab has two views:
- Live streams what the service writes to standard output and standard error, as it happens.
- History keeps those lines, so you can go back to what happened during an incident. Search the text and filter by level: errors only, warnings and errors, info and above, or everything.
Write logs to standard output; there is no file to configure.
Metrics
The Metrics tab charts the service's CPU, memory, network traffic and disk reads and writes, from the last 15 minutes up to the last 7 days.
For a service with a domain, it also shows its HTTP requests, as the region's edge received them: how many, how many failed with a server error, and latency at p50 and p95. This works for any app, instrumented or not.
Traces
Hangar receives traces in the OpenTelemetry format, the open standard supported by every major language. To send them:
- Add the OpenTelemetry SDK for your language, with its automatic instrumentation if there is one.
- Deploy. Hangar sets
OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_PROTOCOLandOTEL_EXPORTER_OTLP_HEADERSon the service, andOTEL_SERVICE_NAMEif you have not set it.
The Traces tab lists traced requests with their duration, and you can filter by operation, such as GET /orders, or by slowness. Opening one shows the whole trace with its spans.
If the service already sets its own exporter variables, Hangar does not add its own, so your telemetry is never sent to two places by surprise.
Alerts
Alert rules live on the Metrics tab. A rule watches one signal over a window of 5, 15 or 60 minutes and fires when it goes above the threshold you set:
| Signal | Measures | Needs |
|---|---|---|
| CPU | average CPU as a share of the service's limit, all replicas together | nothing |
| Memory | average memory as a share of the service's limit | nothing |
| Error rate | share of traced requests that ended in error | an OpenTelemetry SDK and at least 20 requests in the window |
| p95 latency | 95th percentile of traced request duration | an OpenTelemetry SDK and at least 20 requests in the window |
Rules are checked every minute. Alerts go to the notification channels of your organization, set in Settings → Notifications: Slack, Discord, Microsoft Teams, Telegram, Mattermost, email and others, or any URL through a custom webhook. Turn on Service alerts on each channel that should receive them. You are told again when the alert resolves.
How long data is kept
How many days of logs, metrics and traces are kept, and how much telemetry an organization can send in a billing cycle, depend on your plan. Once the monthly amount is reached, new telemetry is dropped until the next cycle; your services keep running normally.
Telemetry is not billed by volume.