DEV Community

Alex Spinov
Alex Spinov

Posted on

OpenTelemetry Has a Free API — Observability Standard for Every App

OpenTelemetry is the open standard for traces, metrics, and logs. It is vendor-neutral, supported by every major observability platform, and backed by CNCF.

What Is OpenTelemetry?

OpenTelemetry (OTel) provides a single set of APIs, SDKs, and tools to instrument your applications. Collect telemetry once, send it anywhere.

Features:

  • Traces, metrics, and logs
  • Auto-instrumentation for 10+ languages
  • Vendor-neutral (works with Jaeger, Grafana, Datadog, etc.)
  • CNCF graduated project
  • Free and open source

Quick Start (Node.js)

npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node
Enter fullscreen mode Exit fullscreen mode
const { NodeSDK } = require("@opentelemetry/sdk-node");
const { getNodeAutoInstrumentations } = require("@opentelemetry/auto-instrumentations-node");

const sdk = new NodeSDK({
  instrumentations: [getNodeAutoInstrumentations()]
});
sdk.start();
// Your Express/Fastify app is now auto-instrumented!
Enter fullscreen mode Exit fullscreen mode

Python Auto-Instrumentation

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

# Run with auto-instrumentation
opentelemetry-instrument --service_name my-app python app.py
Enter fullscreen mode Exit fullscreen mode

OTLP API (send telemetry)

curl -X POST http://localhost:4318/v1/traces \
  -H "Content-Type: application/json" \
  -d '{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"my-api"}}]},"scopeSpans":[{"spans":[{"traceId":"abc123","spanId":"def456","name":"GET /users","startTimeUnixNano":"1679500000000000000","endTimeUnixNano":"1679500001000000000"}]}]}]}'
Enter fullscreen mode Exit fullscreen mode

Use Cases

  1. Distributed tracing — track requests across microservices
  2. Performance monitoring — latency, error rates
  3. Debugging — find bottlenecks
  4. SLA monitoring — track uptime and latency
  5. Cost optimization — switch backends without re-instrumenting

Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)