Star us on GitHub
Star
Menu

curl

Set up highlight.io log ingestion over HTTPS.
1
Send raw logs over HTTPS via curl.

Get started quickly with logs transmitted over HTTPS.

curl -X POST https://pub.highlight.io/v1/logs/raw?project=YOUR_PROJECT_ID&service=my-backend \ -d 'hello, world! this is the log message'
Copy
2
Send structured logs from curl via the OTLP HTTPS protocol.

Get started quickly with logs transmitted over the OTLP HTTPS protocol.

curl -X POST https://otel.highlight.io:4318/v1/logs \ -H 'Content-Type: application/json' \ -d '{ "resourceLogs": [ { "resource": { "attributes": [ { "key": "service.name", "value": { "stringValue": "my-service" } } ] }, "scopeLogs": [ { "scope": {}, "logRecords": [ { "timeUnixNano": "'$(date +%s000000000)'", "severityNumber": 9, "severityText": "Info", "name": "logA", "body": { "stringValue": "Hello, world! This is sent from a curl command." }, "attributes": [ { "key": "highlight.project_id", "value": { "stringValue": "<YOUR_PROJECT_ID>" } }, { "key": "foo", "value": { "stringValue": "bar" } } ], "traceId": "08040201000000000000000000000000", "spanId": "0102040800000000" } ] } ] } ] }'
Copy
3
Verify your backend logs are being recorded.

Visit the highlight logs portal and check that backend logs are coming in.