Naijacloud
Docs

Traces, metrics & logs

Argus takes the standard formats your tools already speak. Point an OpenTelemetry exporter, Prometheus or a log shipper at Argus with a source's key, and keep the setup you have.

5 min read

The key

Every endpoint on this page authenticates with a source's DSN key: the public key in its DSN, the part before the @. Some paths also name the project id, the number at the end of the DSN.

Where the values come from
https://<public key>@argus-in.naijacloud.com/<project id>

One key covers every signal for that app, so its errors, traces, metrics and logs all land under the same source. Send it whichever way your tool supports:

  • Authorization: Bearer <key>
  • HTTP basic auth, with the key as the password (or the user)
  • X-Argus-Key: <key>
  • ?key=<key> on the URL

OpenTelemetry

Argus accepts OTLP over HTTP, as protobuf or JSON, for traces, metrics and logs. Set the standard exporter variables:

OpenTelemetry exporter
bash
OTEL_EXPORTER_OTLP_ENDPOINT=https://argus-in.naijacloud.com OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <your DSN key>" OTEL_SERVICE_NAME=checkout-api

The exporter appends the signal's path itself:

SignalEndpoint
TracesPOST https://argus-in.naijacloud.com/v1/traces
MetricsPOST https://argus-in.naijacloud.com/v1/metrics
LogsPOST https://argus-in.naijacloud.com/v1/logs

OTLP over gRPC is not accepted. Use the HTTP protocol.

Traces

Spans from any OpenTelemetry SDK or Collector show under Argus → Performance. Each incoming request (a span of kind SERVER) is grouped by its route, using http.route when your framework reports one, otherwise the URL path with IDs blanked. For each route you get p50, p95 and p99 latency, requests per minute and error rate. A 5xx response or an error status counts as an error; a 404 doesn't.

Database statements are normalised before they are stored: every literal becomes ?, so no value survives, and the same query with different values is one entry in the slow-queries list. The same statement run 10 or more times under one parent span is flagged as an N+1.

Metrics

OTLP metrics are converted the way the OpenTelemetry Collector's Prometheus exporter does it: dots in names become underscores, monotonic sums get _total, histograms become _bucket, _sum and _count, and service.name becomes the service and job labels.

Prometheus remote-write

Keep your Prometheus and have it send a copy of its metrics to Argus. In prometheus.yml:

prometheus.yml
yaml
remote_write: - url: https://argus-in.naijacloud.com/prometheus/api/v1/write authorization: credentials: <your DSN key>

Argus takes Prometheus remote-write 1.0. Argus → Dashboards → Connect Prometheus / Grafana shows the write URL with your key, and says when the first series arrive.

Your plan sets how many active series (seen in the last day) a workspace can have. Past that, new series are dropped and the rest of the batch still lands; the response's X-Argus-Dropped-Series header says how many were dropped. Your plan's limit is under Argus → Usage & plan.

Reading metrics from Grafana

Argus serves a Prometheus-compatible query API, so Grafana can read your metrics back:

  1. Under Argus → Dashboards → Connect Prometheus / Grafana, a workspace owner or admin creates a read token. It starts with argus_rt_ and is shown once.
  2. In Grafana, add a Prometheus data source with the URL https://argus-api.naijacloud.com/prometheus.
  3. Under Authentication, choose Bearer token and paste the read token.
  4. Choose Save & test.

A read token can only read metrics through that Prometheus API. It can't send data or change anything, and it is refused everywhere else in Argus. Revoke one from the same page; anything using it stops reading at once.

Log drain

Any shipper that can make an HTTP request can send logs:

Log drain
bash
curl -X POST https://argus-in.naijacloud.com/api/<project id>/logs \ -H "Authorization: Bearer <your DSN key>" \ --data-binary @app.log

The body can be a JSON array, newline-delimited JSON, or plain text lines. From a JSON line Argus lifts the well-known fields (time, level, message, service, trace and span IDs, host, stream) and keeps the rest as searchable attributes. From a plain line it detects the level near the start, such as level=error, [WARN] or ERROR:. Timestamps more than 14 days old or more than an hour ahead are replaced with the time the line arrived.

With Vector:

vector.toml
toml
[sources.app] type = "file" include = ["/var/log/myapp/*.log"] [sinks.argus] type = "http" inputs = ["app"] uri = "https://argus-in.naijacloud.com/api/<project id>/logs" encoding.codec = "json" auth.strategy = "bearer" auth.token = "<your DSN key>"

Search the result under Argus → Logs. Each plan includes a monthly log volume. Past it, ingest answers 429 with Retry-After until the month ends.

Logs are scrubbed like errors before they are stored: tokens, card numbers and attributes with secret-looking names are replaced with [Filtered].