Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Capture user agent when tracing (#8094)

Patryk Zawadzki76396ad0cc23
diff --git a/saleor/graphql/views.py b/saleor/graphql/views.py
index 35b746cd44..7bfca7f081 100644
--- a/saleor/graphql/views.py
+++ b/saleor/graphql/views.py
@@ -158,6 +158,7 @@ class GraphQLView(View):
opentracing.tags.HTTP_URL,
request.build_absolute_uri(request.get_full_path()),
)
+ span.set_tag("http.useragent", request.META.get("HTTP_USER_AGENT", ""))
span.set_tag("span.type", "web")
request_ips = request.META.get(settings.REAL_IP_ENVIRON, "")