OpenTelemetry¶
Send OpenTelemetry logs, metrics and traces to Argavon over OTLP/HTTP.
Endpoints¶
| Signal | Endpoint |
|---|---|
| Logs | POST https://argavon.com.com/api/v1/otel/logs |
| Metrics | POST https://argavon.com.com/api/v1/otel/metrics |
| Traces | POST https://argavon.com.com/api/v1/otel/traces |
What they accept:
- OTLP/HTTP only. Protobuf (
Content-Type: application/x-protobuf) or JSON (any other content type is read as OTLP JSON). - gzip or no compression (
Content-Encoding: gzip, or none). Other encodings get415. - gRPC is not supported. There is no OTLP/gRPC listener (port 4317). Use the
Collector's
otlphttpexporter, nototlp.
Protobuf requests get the OTLP answer: 200 with an empty
application/x-protobuf body. JSON requests get 202:
{"status":"accepted","source_type":"otel-logs","events_queued":3}
Before you start¶
A Argavon source of type otel and its token. Create it on
Integrations → OpenTelemetry → Connect OpenTelemetry, or see
Create a source. An otel token works on all three
endpoints.
Collector config¶
Add an otlphttp exporter to your OpenTelemetry Collector. This is the snippet
the Integrations page shows:
exporters:
otlphttp/neuroops:
logs_endpoint: https://argavon.com.com/api/v1/otel/logs
metrics_endpoint: https://argavon.com.com/api/v1/otel/metrics
traces_endpoint: https://argavon.com.com/api/v1/otel/traces
headers:
X-Source-Token: <your source token>
service:
pipelines:
metrics:
exporters: [otlphttp/neuroops] # keep your other exporters too
Then:
- The exporter's defaults work (protobuf and gzip).
- Add
otlphttp/neuroopsto each pipeline you want to send:logs,metrics,traces. Keep your other exporters in the list. - Restart the Collector.
Set the three *_endpoint keys as shown, each with its full URL. Argavon'
paths are /api/v1/otel/logs, /metrics and /traces, not the OTLP default
/v1/logs and so on, so a single base endpoint does not fit them.
Read this first: what becomes an incident¶
Everything you send is stored, but only problems open or join incidents:
| Signal | Stored | Opens or joins an incident |
|---|---|---|
| Logs | Every log record | ERROR and FATAL records (severity number 17 and up) |
| Metrics | Every data point of a gauge or sum metric (histograms and other types are ignored) | Points marked as errors (error=true or an error.type attribute) or with an HTTP 5xx http.status_code |
| Traces | Only spans with status ERROR (code 2); other spans are dropped |
Every stored span |
So an INFO line such as "user logged in", a WARN retry, or an ordinary request-count metric is
kept but pages nobody. To keep volume down, filter in the Collector before the otlphttp/neuroops
exporter anyway.
Events for the same service within 5 minutes join that service's open incident instead of opening new ones. See Incidents and correlation.
OpenTelemetry has no "resolved" signal, so incidents from it are never closed automatically. Resolve them by hand.
How fields are mapped¶
All signals:
| Argavon field | Taken from |
|---|---|
| Service | Resource attribute service.name, else k8s.deployment.name, else k8s.pod.name, else unknown-service |
| Environment | deployment.environment, else deployment.environment.name, else prod |
| Labels | Resource attributes merged with the record's attributes (the record wins) |
Logs:
| Argavon field | Taken from |
|---|---|
| Severity | severityNumber: 21–24 (FATAL) critical, 17–20 (ERROR) high, 13–16 (WARN) medium, 1–12 low. Without a number, severityText is used. |
| Title | exception.message, error.type, event.name or alertname attribute (as "<value> on <service>"), else the log body (first 120 characters) |
| Message | The log body |
| Time | timeUnixNano, else observedTimeUnixNano, else now |
Metrics:
| Argavon field | Taken from |
|---|---|
| Title | Metric: <name> = <value> <unit> |
| Message | The metric description, else the title |
| Severity | high if the data point has http.status_code 5xx, error = true or an error.type; medium for http.status_code 4xx; otherwise low |
| Labels | Also otel.metric.name, otel.metric.value, otel.metric.unit |
Traces (failing spans):
| Argavon field | Taken from |
|---|---|
| Title | Trace error: <span name> |
| Message | The span status message, else the error.message attribute, else span "<name>" failed |
| Severity | critical for http.status_code 5xx; high otherwise |
| Labels | Also otel.span.name, otel.span.kind; trace and span IDs are kept |
Jaeger¶
Jaeger has no alerting of its own. Send the same traces to Argavon through the Collector that feeds Jaeger. Failing spans become trace-error signals.
Create a source of type jaeger (it may post to /api/v1/otel/traces only),
then add a second exporter:
exporters:
otlp/jaeger:
endpoint: jaeger-collector:4317 # your existing Jaeger exporter
otlphttp/neuroops:
traces_endpoint: https://argavon.com.com/api/v1/otel/traces
headers:
X-Source-Token: <your source token>
service:
pipelines:
traces:
exporters: [otlp/jaeger, otlphttp/neuroops]
Send a test without a Collector¶
Click Test next to the source on Integrations: it sends a sample CPU
metric for checkout-api. For a jaeger source it sends a failing
POST /checkout span.
Or with curl, one error log in OTLP JSON:
NOW=$(date +%s%N)
curl -sS -X POST https://argavon.com.com/api/v1/otel/logs \
-H "X-Source-Token: $SOURCE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"resourceLogs": [{
"resource": {"attributes": [
{"key": "service.name", "value": {"stringValue": "checkout-api"}}
]},
"scopeLogs": [{
"logRecords": [{
"timeUnixNano": "'"$NOW"'",
"severityNumber": 17,
"severityText": "ERROR",
"body": {"stringValue": "payment provider timed out"}
}]
}]
}]
}'
Expected answer:
{"status":"accepted","source_type":"otel-logs","events_queued":1}
A high-severity incident payment provider timed out on checkout-api
appears under Incidents.
Limits¶
| Limit | Value |
|---|---|
| Request body as sent | 1 MiB (413 request body too large (max 1 MiB)) |
| Body after gzip decompression | 8 MiB (413 decompressed body too large (max 8 MiB)) |
| Requests per source | 100 per minute |
| Requests per client IP, all ingest endpoints | 600 per minute |
A busy Collector sends one request per batch per signal. If you hit 429,
send fewer, larger batches (each still under 1 MiB) or filter more in the
Collector. If you hit 413, send smaller batches.
If it does not work¶
| You see | Fix |
|---|---|
401 missing or invalid source token … |
Check the X-Source-Token header value. The token may have been rotated. |
403 source token of type "…" is not authorized for this endpoint (expects "otel-…") |
A prometheus, grafana or zabbix token, or a jaeger token on logs or metrics. Use an otel source. |
400 invalid OTLP protobuf: … |
The body is not OTLP protobuf for that signal. Check you did not swap the logs, metrics and traces URLs. |
400 mapping error: … |
The JSON is not OTLP JSON. The payload is in the dead-letter queue. |
415 unsupported Content-Encoding "…"; use gzip or none |
Set the exporter compression to gzip or none. |
Nothing arrives, Collector logs an HTTP error on a path ending in /v1/logs, /v1/metrics or /v1/traces |
The exporter used endpoint instead of logs_endpoint, metrics_endpoint and traces_endpoint. Argavon answers 404 on such paths. |
| Connection refused on port 4317 | You used the gRPC otlp exporter. Use otlphttp. |
| Many incidents, or incidents with huge alert counts | Many ERROR logs or 5xx metric points. Filter in the Collector, or fix the noisy service. |