Lesson 3 / 25

Architecture: API, SDK, Collector, OTLP

How the pieces fit.

From code to backend

Libraries and applications call the API (stable interfaces that do nothing if no SDK is installed, so libraries can instrument safely). The application configures the SDK, which implements sampling, processing and exporters. Data is usually sent with OTLP (OpenTelemetry Protocol) over gRPC (port 4317) or HTTP (port 4318) to the Collector, a separate process that receives, processes and exports telemetry to one or more backends. Semantic conventions standardise attribute names such as http.request.method and service.name.

The data path

Typical deployment.

app code --> OTel API --> OTel SDK (sampler, processors, OTLP exporter)
                               |  OTLP gRPC :4317 / HTTP :4318
                               v
                      OpenTelemetry Collector
             receivers -> processors -> exporters
                               |
          +--------------------+--------------------+
          v                    v                    v
   traces backend        metrics backend       logs backend
   (Jaeger / Tempo)      (Prometheus / Mimir)  (Loki / vendor)

Libraries depend on the API only

Library authors should never configure an SDK; the application owner decides how telemetry is processed and exported.

Quick check: Which default port does OTLP over gRPC use?

  • 4318
  • 9090
  • 8080
  • 4317
Answer

4317 — 4318 is OTLP over HTTP.