Module otlp

Module otlp 

Source
Expand description

OTLP/HTTP routes (logs, metrics, traces) for the ingestion server OTLP/HTTP route registration for telemetry-ingestion-srv.

Exposes three routes that match the OTLP/HTTP spec:

  • POST /ingestion/otlp/v1/logs
  • POST /ingestion/otlp/v1/metrics
  • POST /ingestion/otlp/v1/traces

The OTLP sub-router applies its own 20 MiB body limit (matching the OTel Collector confighttp.max_request_body_size default) plus gzip request decompression, independent of the parent router’s 100 MiB limit on /ingestion/insert_block.

Per OTLP/HTTP spec, success responses mirror the request encoding (JSON in → JSON out, proto in → proto out). Error responses (4xx/5xx) carry a google.rpc.Status body encoded in the same way, except 415 responses which always use protobuf because the request encoding is unknown at that point.

Functions§

otlp_router
Builds a sub-Router carrying the three OTLP routes plus the body-limit and gzip-decompression layers scoped to those routes.