curl / HTTP
This guide configures logs, traces, metrics. Replace YOUR_INGEST_KEY with your key on your server, never in a public example.
1. Send an OTLP logs sample
Section titled “1. Send an OTLP logs sample”Run in a terminal with curl and a POSIX shell. Each run sends a record with the current time.
timestamp="$(date +%s)000000000"curl --fail-with-body -X POST 'https://otlp.siteqwality.com/v1/logs' \ -H 'Authorization: Bearer YOUR_INGEST_KEY' \ -H 'Content-Type: application/json' \ --data-binary '{"resourceLogs":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"checkout"}},{"key":"deployment.environment.name","value":{"stringValue":"production"}}]},"scopeLogs":[{"logRecords":[{"timeUnixNano":"'"$timestamp"'","severityNumber":9,"severityText":"INFO","body":{"stringValue":"order placed"}}]}]}]}'2. Send an OTLP traces sample
Section titled “2. Send an OTLP traces sample”This sample uses fixed demonstration trace and span IDs; use unique IDs for real requests.
timestamp="$(date +%s)000000000"start_timestamp="$(($(date +%s) - 1))000000000"curl --fail-with-body -X POST 'https://otlp.siteqwality.com/v1/traces' \ -H 'Authorization: Bearer YOUR_INGEST_KEY' \ -H 'Content-Type: application/json' \ --data-binary '{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"checkout"}},{"key":"deployment.environment.name","value":{"stringValue":"production"}}]},"scopeSpans":[{"spans":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"00f067aa0ba902b7","name":"place order","kind":2,"startTimeUnixNano":"'"$start_timestamp"'","endTimeUnixNano":"'"$timestamp"'","status":{"code":1}}]}]}]}'3. Send an OTLP metrics sample
Section titled “3. Send an OTLP metrics sample”timestamp="$(date +%s)000000000"start_timestamp="$(($(date +%s) - 60))000000000"curl --fail-with-body -X POST 'https://otlp.siteqwality.com/v1/metrics' \ -H 'Authorization: Bearer YOUR_INGEST_KEY' \ -H 'Content-Type: application/json' \ --data-binary '{"resourceMetrics":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"checkout"}},{"key":"deployment.environment.name","value":{"stringValue":"production"}}]},"scopeMetrics":[{"metrics":[{"name":"orders.placed","sum":{"aggregationTemporality":2,"isMonotonic":true,"dataPoints":[{"startTimeUnixNano":"'"$start_timestamp"'","timeUnixNano":"'"$timestamp"'","asInt":"1"}]}}]}]}]}'See your data
Section titled “See your data”Open Logs, Traces or Metrics. New data usually shows up within a minute, and a page that says it is waiting for data switches to your data on its own. Nothing arriving? See what each status code means in failure handling.
Production checklist
Section titled “Production checklist”Store the key in your platform secret mechanism, rotate it when exposed and remove test keys. Set a stable service.name and deployment.environment.name; avoid user IDs or unbounded values in metric labels. Prefer a persistent queue, bounded retries and exporter failure monitoring. Review redaction and processors before increasing traffic.