Skip to content

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

Unify GraphQl span naming across tracers

Tomasz Szymanski8d4625aa806f
diff --git a/saleor/graphql/tests/test_tracing.py b/saleor/graphql/tests/test_tracing.py
index 6a4b893afc..5288bc3f8d 100644
--- a/saleor/graphql/tests/test_tracing.py
+++ b/saleor/graphql/tests/test_tracing.py
@@ -10,7 +10,7 @@ def _get_graphql_span(spans):
def _get_graphql_spans(spans):
- return filter(lambda item: item.tags["component"] == "GraphQL", spans)
+ return filter(lambda item: item.tags.get("graphql.query_fingerprint"), spans)
@patch("saleor.graphql.views.opentracing.global_tracer")
diff --git a/saleor/graphql/views.py b/saleor/graphql/views.py
index ea42addfb7..d3da981214 100644
--- a/saleor/graphql/views.py
+++ b/saleor/graphql/views.py
@@ -251,7 +251,7 @@ class GraphQLView(View):
def execute_graphql_request(self, request: HttpRequest, data: dict):
with opentracing.global_tracer().start_active_span("graphql_query") as scope:
span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "GraphQL")
+ span.set_tag(opentracing.tags.COMPONENT, "graphql")
query, variables, operation_name = self.get_graphql_params(request, data)