From 71bc865dee816ebf0d2f693740cf83e4cc5f1478 Mon Sep 17 00:00:00 2001 From: dimitraparaskevopoulou Date: Mon, 31 May 2021 08:48:18 +0200 Subject: [PATCH] not setting the path_tpl at all when it evaluates to None --- instana/instrumentation/sanic_inst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instana/instrumentation/sanic_inst.py b/instana/instrumentation/sanic_inst.py index a5159058..192f56f8 100644 --- a/instana/instrumentation/sanic_inst.py +++ b/instana/instrumentation/sanic_inst.py @@ -121,7 +121,7 @@ async def handle_request_with_instana(wrapped, instance, args, kwargs): if agent.options.extra_http_headers is not None: extract_custom_headers(scope, headers) await wrapped(*args, **kwargs) - if hasattr(request, "uri_template"): + if hasattr(request, "uri_template") and request.uri_template: scope.span.set_tag("http.path_tpl", request.uri_template) if hasattr(request, "ctx"): # ctx attribute added in the latest v19 versions request.ctx.iscope = scope