From 5c139e2d8a260544bc5e730de0440edbab4b0f03 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 22 Oct 2025 17:57:29 +0200 Subject: add support for OTLP logging/tracing (#599) - adds `zentelemetry` project which houses new functionality for serializing logs and traces in OpenTelemetry Protocol format (OTLP) - moved existing stats functionality from `zencore` to `zentelemetry` - adds `TRefCounted` for vtable-less refcounting - adds `MemoryArena` class which allows for linear allocation of memory from chunks - adds `protozero` which is used to encode OTLP protobuf messages --- src/zenhttp/httpserver.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/zenhttp/httpserver.cpp') diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp index 2c063d646..f48c22367 100644 --- a/src/zenhttp/httpserver.cpp +++ b/src/zenhttp/httpserver.cpp @@ -86,6 +86,9 @@ MapContentTypeToString(HttpContentType ContentType) case HttpContentType::kXML: return "application/xml"sv; + + case HttpContentType::kProtobuf: + return "application/x-protobuf"sv; } } @@ -119,6 +122,7 @@ static constinit uint32_t HashImagePng = HashStringDjb2("image/png"sv); static constinit uint32_t HashIcon = HashStringDjb2("ico"sv); static constinit uint32_t HashImageIcon = HashStringDjb2("image/x-icon"sv); static constinit uint32_t HashXml = HashStringDjb2("application/xml"sv); +static constinit uint32_t HashProtobuf = HashStringDjb2("application/x-protobuf"sv); std::once_flag InitContentTypeLookup; @@ -153,6 +157,7 @@ struct HashedTypeEntry {HashIcon, HttpContentType::kIcon}, {HashImageIcon, HttpContentType::kIcon}, {HashXml, HttpContentType::kXML}, + {HashProtobuf, HttpContentType::kProtobuf}, // clang-format on }; -- cgit v1.2.3