Skip to content

Commit 73636a0

Browse files
authored
not setting the path_tpl at all when it evaluates to None (#320)
1 parent 84480a9 commit 73636a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instana/instrumentation/sanic_inst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async def handle_request_with_instana(wrapped, instance, args, kwargs):
121121
if agent.options.extra_http_headers is not None:
122122
extract_custom_headers(scope, headers)
123123
await wrapped(*args, **kwargs)
124-
if hasattr(request, "uri_template"):
124+
if hasattr(request, "uri_template") and request.uri_template:
125125
scope.span.set_tag("http.path_tpl", request.uri_template)
126126
if hasattr(request, "ctx"): # ctx attribute added in the latest v19 versions
127127
request.ctx.iscope = scope

0 commit comments

Comments
 (0)