From e6f44577f469e891ed8dab1492a4c53224e0b765 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 2 Dec 2024 12:21:53 +0100 Subject: added support for dynamic LLM tags (#245) * added FLLMTag which can be used to register memory tags outside of core * changed `UE_MEMSCOPE` -> `ZEN_MEMSCOPE` for consistency * instrumented some subsystems with dynamic tags --- src/zenserver/cache/httpstructuredcache.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/zenserver/cache/httpstructuredcache.cpp') diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index f49f6a645..a6606c7ad 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,14 @@ namespace zen { +const FLLMTag& +GetCacheHttpTag() +{ + static FLLMTag CacheHttpTag("http", FLLMTag("cache")); + + return CacheHttpTag; +} + using namespace std::literals; ////////////////////////////////////////////////////////////////////////// @@ -365,6 +374,8 @@ HttpStructuredCacheService::HandleRequest(HttpServerRequest& Request) { ZEN_TRACE_CPU("z$::Http::HandleRequest"); + ZEN_MEMSCOPE(GetCacheHttpTag()); + metrics::OperationTiming::Scope $(m_HttpRequests); const std::string_view Key = Request.RelativeUri(); @@ -1742,6 +1753,8 @@ HttpStructuredCacheService::HandleRpcRequest(HttpServerRequest& Request, std::st void HttpStructuredCacheService::HandleStatsRequest(HttpServerRequest& Request) { + ZEN_MEMSCOPE(GetCacheHttpTag()); + CbObjectWriter Cbo; EmitSnapshot("requests", m_HttpRequests, Cbo); -- cgit v1.2.3