LogsSend logs (OTLP/HTTP)

Send logs (OTLP/HTTP)

An OTLP/HTTP ExportLogsServiceRequest, protobuf or OTLP/JSON, optionally gzip-compressed. POST /v1/logs is the same endpoint. Point an OpenTelemetry Collector otlphttp exporter at https://mythic-analytics.gulp.workers.dev/i, or an SDK log exporter at this full URL.

Limits: 1 MB on the wire, 4 MB after gzip, 1,000 records per request, 64 KB per record, 30 days of age. Delivery is at least once.

curl -X POST "https://mythic-analytics.gulp.workers.dev/i/v1/logs" \
  -H "Content-Type: application/json" \
  -H "Content-Encoding: gzip" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  "resourceLogs": [
    {
      "resource": {
        "attributes": [
          {
            "key": "mythic.distinct_id",
            "value": {
              "stringValue": "example_string",
              "boolValue": true,
              "intValue": "example_string",
              "doubleValue": 3.14,
              "arrayValue": {},
              "kvlistValue": {},
              "bytesValue": "example_string"
            }
          }
        ]
      },
      "scopeLogs": [
        {
          "scope": {
            "name": "John Doe",
            "version": "example_string"
          },
          "logRecords": [
            {
              "timeUnixNano": "1789898400000000000",
              "observedTimeUnixNano": "example_string",
              "severityNumber": 17,
              "severityText": "ERROR",
              "body": {
                "stringValue": "example_string",
                "boolValue": true,
                "intValue": "example_string",
                "doubleValue": 3.14,
                "arrayValue": {},
                "kvlistValue": {},
                "bytesValue": "example_string"
              },
              "attributes": [
                {
                  "key": "mythic.distinct_id",
                  "value": {
                    "stringValue": "example_string",
                    "boolValue": true,
                    "intValue": "example_string",
                    "doubleValue": 3.14,
                    "arrayValue": {},
                    "kvlistValue": {},
                    "bytesValue": "example_string"
                  }
                }
              ],
              "traceId": "5b8efff798038103d269b633813fc60c",
              "spanId": "eee19b7ec3c1b174",
              "eventName": "John Doe"
            }
          ]
        }
      ]
    }
  ]
}'
{
  "partialSuccess": {
    "rejectedLogRecords": "2",
    "errorMessage": "rejected log records: too_old=2"
  }
}
POST
/i/v1/logs
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

The location's publishable key (pk_). Ingestion only.

The location's publishable key (pk_). Ingestion only.
API Key (header: X-Api-Key)
X-Api-Keystring
Required

The location's publishable key (pk_), as a header. Ingestion only.

The location's publishable key (pk_), as a header. Ingestion only.
Content-Typestring
Required

The media type of the request body

Options: application/x-protobuf, application/json
header
Content-Encodingstring
Options: gzip, identity
datafile
Required

opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest

Format: binary
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. The location's publishable key (pk_). Ingestion only.

header
X-Api-Keystring
Required

API Key for authentication. The location's publishable key (pk_), as a header. Ingestion only.

Headers

Content-Encodingstring
Allowed values:gzipidentity

Body

Responses

partialSuccessobject