Fix trace header data
Signed-off-by: Dmitrii <computer@yawaflua.tech> Took 5 minutes
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user