pub fn otlp_router() -> RouterExpand description
Builds a sub-Router carrying the three OTLP routes plus the body-limit and gzip-decompression layers scoped to those routes.
Layer order, outermost → innermost (request travels through them top to bottom):
DefaultBodyLimit::max(300 MiB)— caps the post-decompression bytes the handler’sBytesextractor will materialize, defending against gzip-bomb expansion that the wire-byte limit can’t see.RequestBodyLimitLayer(20 MiB)— caps the compressed wire bytes; enforced before decompression, returning 413 on oversize.RequestDecompressionLayer— gzip-decodes the body before the handler.- handler.