From 79db5802bee70664df3620f3e61f21fd9c82af64 Mon Sep 17 00:00:00 2001 From: Peter Giacomo Lombardo Date: Mon, 29 Oct 2018 12:24:50 +0100 Subject: [PATCH] Report path templates in HTTP spans --- instana/json_span.py | 1 + instana/recorder.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/instana/json_span.py b/instana/json_span.py index f0a55516..74a6dc68 100644 --- a/instana/json_span.py +++ b/instana/json_span.py @@ -44,6 +44,7 @@ class HttpData(object): url = None status = 0 method = None + path_tpl = None error = None def __init__(self, **kwds): diff --git a/instana/recorder.py b/instana/recorder.py index 57d0e657..bb00062a 100644 --- a/instana/recorder.py +++ b/instana/recorder.py @@ -102,9 +102,10 @@ def build_registered_span(self, span): if span.operation_name in self.http_spans: data.http = HttpData(host=self.get_http_host_name(span), - url=span.tags.pop(ext.HTTP_URL, ""), - method=span.tags.pop(ext.HTTP_METHOD, ""), + url=span.tags.pop(ext.HTTP_URL, None), + method=span.tags.pop(ext.HTTP_METHOD, None), status=span.tags.pop(ext.HTTP_STATUS_CODE, None), + path_tpl=span.tags.pop("http.path_tpl", None), error=span.tags.pop('http.error', None)) if span.operation_name == "rabbitmq":