Skip to Content
OpenPerf

Instrument

OpenTelemetry

Send traces, logs and errors from any language to OpenPerf over OTLP.

OpenPerf accepts OTLP over HTTP, so an app in any language can send data with a standard OpenTelemetry SDK or the Collector. For the browser, Node.js and Bun, use the OpenPerf SDK from the Quickstart instead.

Configure the exporter

Open the project under Settings → Projects and find the Connection section. Copy Endpoint for OTEL_EXPORTER_OTLP_ENDPOINT, and take the opf_… project key from the DSN (https://opf_…@ingest.example.com).

Set the standard OpenTelemetry variables before the app starts:

export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.example.com"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer%20opf_…"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_TRACES_EXPORTER="otlp"
export OTEL_LOGS_EXPORTER="otlp"
export OTEL_METRICS_EXPORTER="none"
export OTEL_RESOURCE_ATTRIBUTES="service.version=1.4.0,deployment.environment.name=production"
  • The exporter appends /v1/traces and /v1/logs to OTEL_EXPORTER_OTLP_ENDPOINT.
  • %20 is the URL-encoded space after Bearer.
  • OpenPerf has no metrics endpoint, so the metrics exporter is off.
  • service.version becomes the release and deployment.environment.name the environment.

Then start the app with OpenTelemetry turned on:

pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
opentelemetry-bootstrap -a install

export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
opentelemetry-instrument python app.py

The extra variable sends the records of the logging module.

Send a request to the app and open Traces.

Pick the Node.js type for a backend service

A project has one of three types: JavaScript / Web, Node.js or Bun. The Backend performance screens list only Node.js and Bun projects in their Project filter.

Endpoints

SignalRequest
TracesPOST https://ingest.example.com/v1/traces
LogsPOST https://ingest.example.com/v1/logs
  • Body. OTLP as application/x-protobuf or application/json, with optional Content-Encoding: gzip. gRPC is not accepted.
  • Key. Send Authorization: Bearer opf_…. If your exporter can't set headers, put the key in the signal URLs instead, for example OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://ingest.example.com/v1/traces?key=opf_…".
  • Browsers. If the project has Allowed origins, a request with an Origin header must come from one of them.

What OpenPerf does with the data

Spans

OpenPerf stores every span and reads its semantic-convention attributes:

  • A root span, or a span of kind SERVER or CONSUMER, becomes a transaction in Backend performance. Its name is the HTTP method plus http.route, such as GET /orders/:id, or the span name without a route.
  • Client spans with db.system.name feed Queries, except cache systems such as Redis. Client spans with an HTTP method feed Outbound.
  • A span with the ERROR status counts as failed.
  • Literals in db.query.text are replaced with ?, and values of sensitive URL query parameters with FILTERED.

Logs

A log record keeps its body, severity, attributes and scope name. The severity comes from severityNumber, or from severityText when the number is missing. The trace and span IDs on the record link it to its trace.

Exceptions

OpenPerf turns two things into an error:

  • A span event named exception. This is what recordException in Java, record_exception in Python and RecordError in Go add to a span. The error gets the error level and links to the span and its trace.
  • A log record with an exception.type, exception.message or exception.stacktrace attribute. Its severity sets the level: fatal, error, or warn for anything lower. The record still shows up in Logs.

Errors are grouped by type and the top frames of the stack trace. Set openperf.error.fingerprint to group them yourself. The same exception reported more than once in one trace is stored once.

Stack traces are split into frames for JavaScript, Python, Ruby, Go, Java and PHP, picked by telemetry.sdk.language. In Go, pass trace.WithStackTrace(true) to RecordError to send one.

Key attributes

OpenPerf stores every attribute you send and uses standard OpenTelemetry semantic conventions (plus openperf.* overrides) to populate the dashboard:

ScopeAttributesDrives
Resourceservice.version, deployment.environment.name, telemetry.sdk.language, openperf.source, vcs.ref.head.revisionRelease, environment, platform (server/browser), parser and ref
Spansopenperf.op, http.route, http.request.method, http.response.status_code, openperf.transaction, url.path, url.full, openperf.measurement.<name>Operation, transaction name, status rates and Web Vitals (lcp, fcp, inp, ttfb, cls)
DB & HTTPdb.system.name, db.query.summary, db.query.text, db.operation.name, db.collection.name, server.address, url.templateQueries and Outbound views (SQL literals are scrubbed to ?)
Errorsexception.type, exception.message, exception.stacktrace, openperf.error.fingerprint, openperf.error.handled, openperf.error.id, openperf.breadcrumbsGrouping, deduplication, handled state and breadcrumbs (last 100)
Useruser.id, user.name, user.email, user_agent.original, client.address, browser.*, os.*, device.*, runtime.*Affected user counts and error occurrence tags

The Spans, DB & HTTP and Errors rows are read from the span, the log record or the exception event that carries them. Set on the resource, they are stored but drive nothing. user.id is the exception: a resource may set it for all its records.

Limits

These are the default limits:

LimitValue
Request body10 MB after decompression
Records50,000 log records, or spans and span events, per request, and 500,000 attributes
Requests10,000 per minute for a project, and the same for one IP address
TimestampsNot older than 7 days and not more than 10 minutes ahead
IDsA span needs a valid trace ID and span ID
Attributes128 per span, log record or resource; keys over 256 chars are dropped, values cut at 32 KB
Log bodyCut at 32 KB

Spans and log records that break the timestamp or ID rules are dropped and counted in the partialSuccess field of the 200 response. A 429 or 503 response carries a Retry-After header in seconds. Retrying is safe: an identical body sent again within 15 minutes is not stored twice.

On this page