Skip to content
telemioDeveloper Docs
Open console
DOCUMENTATIONQuickstart · OpenTelemetryBrowse integrations ↗
MULTI-LANGUAGE OTLP

OTLP Protobuf across languages

One OTLP wire contract, language-specific OpenTelemetry integrations, and the same Telemio backend.

What you will build

Send a checkout trace as binary Protobuf from TypeScript, Python, Go, or Rust. TypeScript requires the first-party @telemio/sdk 0.2.0 or newer; verify that version has been published before deploying this guide.

← All implementation paths

Shared wire contract

The upstream OpenTelemetry Protobuf schema defines OTLP export messages. The language tabs below show instrumentation and exporter code, not code that Protobuf generates automatically.

Before you begin: Create a Telemio workspace and a service-scoped ingest credential. Set TELEMIO_API_KEY in a trusted server environment; never embed it in a browser, mobile binary, or source control. Configure the service name and use a separate key per permitted service where appropriate.
OTLP/HTTP pathProtobuf request message
/v1/tracesExportTraceServiceRequest
/v1/metricsExportMetricsServiceRequest
/v1/logsExportLogsServiceRequest

All three paths accept Content-Type: application/x-protobuf. Exporters should use Authorization: Bearer <workspace-scoped ingest key>. The traces examples below use https://api.telemio.sh/v1/traces. Standard OTLP SDK exporters can send metrics and logs to their respective paths.

Choose your language

Examples share service.name=checkout-api and emit checkout.complete. Select a language and copy the install and source snippets. Only TypeScript uses the published first-party package.

TypeScript · OTLP/HTTP Protobuf

First-party npm SDK; JSON remains the default. Set otlpProtocol only when you want binary OTLP export.

Shell
npm install @telemio/sdk@^0.2.0
TypeScript
import { createTelemio } from "@telemio/sdk";

const telemio = createTelemio({
  endpoint: "https://api.telemio.sh",
  serviceName: "checkout-api",
  apiKey: process.env.TELEMIO_API_KEY,
  otlpProtocol: "http/protobuf", // Opt in to binary Protobuf
});

await telemio.tracer.withSpan("checkout.complete", async span => {
  span.setAttribute("checkout.result", "success");
});
await telemio.metrics.gauge("checkout.active", 12);
await telemio.logger.info("checkout.completed");

Schema code generation versus instrumentation

Tools such as Buf compile .proto schemas into typed message definitions. They do not produce tracing middleware, exporters, credential handling, or a native Telemio SDK. For most applications, use the upstream OpenTelemetry SDK and OTLP exporter shown above rather than constructing export messages by hand.

Docs maintainers can regenerate this page from one source using node scripts/generate-otlp-docs.mjs and verify it with node scripts/generate-otlp-docs.mjs --check. This documentation generator uses the canonical OTLP paths and language-specific templates; it does not run protoc.

Verify ingestion

Run the example in a trusted environment and check the Query page in Telemio for a trace named checkout.complete. If it is absent, confirm the HTTPS endpoint, the credential's ingest scope, service authorization, and the application/x-protobuf content type.