API referenceConsole
Connect

Telemetry

Send events, logs, traces and metrics to Polylane, then query them on the Telemetry page and let agents use them in investigations.

Polylane can store the telemetry that your services send to it. You can then query it on the Telemetry page of the console, and Polylane agents query it when they investigate an issue. Use it when you do not have an observability provider yet, or to give agents events that your provider does not hold.

Polylane keeps each event for 7 days. Each workspace can send up to 10 million events every 30 days, counted from the day the workspace was created, at no charge.

Get a telemetry token

Every request needs a telemetry token of your workspace.

  1. Open the Telemetry page and select Send data.
  2. Polylane creates a token named send-data for the window. The agent prompt, the demo command and the OpenTelemetry settings in the window use that token.

The window also has a prompt for your coding agent, such as Claude Code, Cursor or Codex. The agent adds OpenTelemetry to your app and checks that Polylane receives the events. The window shows the events when they arrive.

You can also create, reveal and copy tokens in Settings → Telemetry Tokens.

Send the token in one of these places:

  • The x-polylane-telemetry-token header.
  • The Authorization header, as Bearer <token>.
  • The polylane-telemetry-token query parameter, when your tool can only set a URL.

Send JSON events

Send a POST request to https://events.polylane.com/v1/<dataset>. The dataset is a name that you choose, such as checkout-api. It has 1 to 64 letters, digits, dots, dashes or underscores. You can filter by dataset on the Telemetry page.

The body is one JSON object, an array of JSON objects, or a line of text. Polylane stores a line of text as the message of one event.

curl -X POST "https://events.polylane.com/v1/checkout-api" \
  -H "Content-Type: application/json" \
  -H "x-polylane-telemetry-token: <your-telemetry-token>" \
  -H "x-polylane-service: checkout" \
  -d '[
    { "message": "Order placed", "level": "info", "requestId": "req_8f2c", "duration": 87 },
    { "message": "Payment declined", "level": "error", "requestId": "req_8f2c", "error": "CardDeclinedError: insufficient funds" }
  ]'

Set the service name in the x-polylane-service header, or add it to the path as /v1/<dataset>/<service>.

Polylane reads these fields as standard fields. All other fields are attributes, and you can filter, group and calculate on each of them.

FieldMeaning
messageThe text of the event.
levelThe log level, such as info, warn or error.
errorThe error text. An event with an error counts as a failure.
durationThe duration in milliseconds.
requestIdGroups the events of one request on the Requests tab.
traceId, spanIdConnect the event to a trace.

Polylane also reads other names for these fields, such as request_id and trace_id. Requests, traces and fields lists them, and shows how to add a request id and a trace id to your logs.

Send OpenTelemetry data

Polylane accepts OTLP/HTTP traces, logs and metrics at https://otel.polylane.com/v1/traces, /v1/logs and /v1/metrics. It accepts JSON and protobuf bodies, with optional gzip. otel-grpc.polylane.com accepts OTLP gRPC-web export calls.

Set the dataset in the x-polylane-dataset header. OpenTelemetry resources set the service name. Set a requestId attribute on spans and log records to group them on the Requests tab.

From an SDK

Every OpenTelemetry SDK reads these variables. Set them where your service runs.

export OTEL_EXPORTER_OTLP_ENDPOINT="https://otel.polylane.com"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_HEADERS="x-polylane-telemetry-token=<your-telemetry-token>,x-polylane-dataset=checkout-api"
export OTEL_SERVICE_NAME="checkout"

From the OpenTelemetry Collector

The Collector does not read the SDK variables. Add an otlphttp exporter to its configuration, add the exporter to each pipeline, and restart the Collector.

exporters:
  otlphttp/polylane:
    endpoint: https://otel.polylane.com
    headers:
      x-polylane-telemetry-token: <your-telemetry-token>
      x-polylane-dataset: checkout-api

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/polylane]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/polylane]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/polylane]

Query your telemetry

The Telemetry page has four views:

  • Visualisation charts counts, sums, averages and percentiles, grouped by any field.
  • Requests groups the events of each request. Expand a request to see its logs and its trace.
  • Traces lists each trace with its duration, services and errors.
  • Raw data lists each event with all its fields.

A query on standard fields with exact filters answers in less than a second. A query on attributes, or with a text search, takes a few seconds and sees an event about 5 minutes after it arrives.

When your workspace has sent telemetry, Polylane agents can query it in investigations, with the same filters and calculations.

Limits

LimitValue
Free eventsUp to 10 million events every 30 days, counted from the day the workspace was created, at no charge
Retention7 days
Event size16 KB. Polylane shortens long values and marks the event as truncated
Event timeUp to 2 days in the past

Polylane scrubs the values of fields whose names show a secret, such as password or authorization, before it stores an event. Scrubbing gives the full list, and the size limits of each field.

When a workspace sends more than 10 million events in a 30-day period, Polylane pauses ingestion until the next 30-day period starts. Polylane sends an email to the workspace admins and owners. The events that Polylane already stored stay available to query. For more volume, use a dedicated observability provider, such as Datadog, Honeycomb, Axiom or Grafana, and connect it to Polylane. Agents then read your telemetry from that provider.