Fix trace header data

Signed-off-by: Dmitrii <computer@yawaflua.tech>

Took 5 minutes
This commit is contained in:
Dmitrii
2026-07-12 08:03:14 +03:00
parent efe19edaf4
commit 7f81db4a15
@@ -28,7 +28,7 @@ public class RequestTelemetryMiddleware(RequestDelegate next, ILogger<RequestTel
activity?.SetTag("http.host", context.Request.Host.Value ?? string.Empty); activity?.SetTag("http.host", context.Request.Host.Value ?? string.Empty);
activity?.SetTag("client.ip", context.Connection.RemoteIpAddress?.ToString()); activity?.SetTag("client.ip", context.Connection.RemoteIpAddress?.ToString());
activity?.SetTag("http.user_agent", context.Request.Headers.UserAgent.ToString()); activity?.SetTag("http.user_agent", context.Request.Headers.UserAgent.ToString());
activity?.SetTag("http.headers", context.Request.Headers.ToString()); activity?.SetTag("http.headers", string.Join(", ", context.Request.Headers.Select(h => $"{h.Key}: {h.Value}")));
var stopwatch = Stopwatch.StartNew(); var stopwatch = Stopwatch.StartNew();
try try