aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-12-11 16:12:02 +0100
committerGitHub Enterprise <[email protected]>2025-12-11 16:12:02 +0100
commit567293ab1baa8cb0eca843977c520e5b8f400b4d (patch)
tree1f54f12d3fb19b91695bbfea33fa9abd8de49f69 /src/zenhttp/include
parent5.7.14 (diff)
downloadzen-567293ab1baa8cb0eca843977c520e5b8f400b4d.tar.xz
zen-567293ab1baa8cb0eca843977c520e5b8f400b4d.zip
add otel instrumentation (#581)
this change adds OTEL tracing to a few places * Top-level application lifecycle (config/init/cleanup, main loop) * http.sys requests it also brings some otlptrace optimizations and dynamic configuration of tracing. OTLP tracing is currently always disabled
Diffstat (limited to 'src/zenhttp/include')
-rw-r--r--src/zenhttp/include/zenhttp/httpserver.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zenhttp/include/zenhttp/httpserver.h b/src/zenhttp/include/zenhttp/httpserver.h
index 9e5c41ab7..074e40734 100644
--- a/src/zenhttp/include/zenhttp/httpserver.h
+++ b/src/zenhttp/include/zenhttp/httpserver.h
@@ -24,13 +24,14 @@
namespace zen {
class CbPackage;
+class HttpService;
/** HTTP Server Request
*/
class HttpServerRequest
{
public:
- HttpServerRequest();
+ explicit HttpServerRequest(HttpService& Service);
~HttpServerRequest();
// Synchronous operations
@@ -38,6 +39,7 @@ public:
[[nodiscard]] inline std::string_view RelativeUri() const { return m_Uri; } // Returns URI without service prefix
[[nodiscard]] std::string_view RelativeUriWithExtension() const { return m_UriWithExtension; }
[[nodiscard]] inline std::string_view QueryString() const { return m_QueryString; }
+ [[nodiscard]] inline std::string_view BaseUri() const { return m_BaseUri; } // Service prefix
struct QueryParams
{
@@ -120,7 +122,8 @@ protected:
HttpContentType m_ContentType = HttpContentType::kBinary;
HttpContentType m_AcceptType = HttpContentType::kUnknownContentType;
uint64_t m_ContentLength = ~0ull;
- std::string_view m_Uri;
+ std::string_view m_BaseUri; // Base URI path of the service handling this request
+ std::string_view m_Uri; // URI without service prefix
std::string_view m_UriWithExtension;
std::string_view m_QueryString;
mutable uint32_t m_RequestId = ~uint32_t(0);