aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/servers/httpsys.cpp
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2026-03-09 18:25:30 -0700
committerLiam Mitchell <[email protected]>2026-03-09 18:25:30 -0700
commit57c1683b2935c834250b73eb506319ed67946160 (patch)
tree1fc8f237010b26e65659b731fe6f6eae30422f5c /src/zenhttp/servers/httpsys.cpp
parentAllow external OidcToken executable to be specified unless disabled via comma... (diff)
parentreduce lock time for project store gc precache and gc validate (#750) (diff)
downloadzen-57c1683b2935c834250b73eb506319ed67946160.tar.xz
zen-57c1683b2935c834250b73eb506319ed67946160.zip
Merge branch 'main' into lm/oidctoken-exe-path
Diffstat (limited to 'src/zenhttp/servers/httpsys.cpp')
-rw-r--r--src/zenhttp/servers/httpsys.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/zenhttp/servers/httpsys.cpp b/src/zenhttp/servers/httpsys.cpp
index c555a39b6..54cc0c22d 100644
--- a/src/zenhttp/servers/httpsys.cpp
+++ b/src/zenhttp/servers/httpsys.cpp
@@ -1647,9 +1647,9 @@ HttpSysTransaction::InvokeRequestHandler(HttpService& Service, IoBuffer Payload)
std::string_view Verb = ToString(ThisRequest.RequestVerb());
std::string_view Uri = ThisRequest.m_UriUtf8.ToView();
- ExtendableStringBuilder<64> SpanName;
- SpanName << Verb << " " << Uri;
- otel::ScopedSpan HttpSpan(SpanName.ToView(), [&](otel::Span& Span) {
+ auto SpanNamer = [&](StringBuilderBase& SpanName) { SpanName << Verb << " " << Uri; };
+
+ auto SpanAnnotator = [&](otel::Span& Span) {
Span.AddAttribute("http.request.method"sv, Verb);
Span.AddAttribute("url.path"sv, Uri);
// FIXME: should be total size including headers etc according to spec
@@ -1661,7 +1661,9 @@ HttpSysTransaction::InvokeRequestHandler(HttpService& Service, IoBuffer Payload)
ExtendableStringBuilder<64> ClientAddr;
GetAddressString(ClientAddr, SockAddr, /* IncludePort */ false);
Span.AddAttribute("client.address"sv, ClientAddr.ToView());
- });
+ };
+
+ otel::ScopedSpan HttpSpan(SpanNamer, SpanAnnotator);
# endif
if (!HandlePackageOffers(Service, ThisRequest, m_PackageHandler))