aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpserver.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-10-22 17:57:29 +0200
committerGitHub Enterprise <[email protected]>2025-10-22 17:57:29 +0200
commit5c139e2d8a260544bc5e730de0440edbab4b0f03 (patch)
treeb477208925fe3b373d4833460b90d61a8051cf05 /src/zenhttp/httpserver.cpp
parent5.7.7-pre3 (diff)
downloadzen-5c139e2d8a260544bc5e730de0440edbab4b0f03.tar.xz
zen-5c139e2d8a260544bc5e730de0440edbab4b0f03.zip
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<T>` 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
Diffstat (limited to 'src/zenhttp/httpserver.cpp')
-rw-r--r--src/zenhttp/httpserver.cpp5
1 files changed, 5 insertions, 0 deletions
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
};