Skip to content

Commit 6c58812

Browse files
authored
Report path templates in HTTP spans (#103)
1 parent 3523a82 commit 6c58812

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

instana/json_span.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class HttpData(object):
4444
url = None
4545
status = 0
4646
method = None
47+
path_tpl = None
4748
error = None
4849

4950
def __init__(self, **kwds):

instana/recorder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ def build_registered_span(self, span):
102102

103103
if span.operation_name in self.http_spans:
104104
data.http = HttpData(host=self.get_http_host_name(span),
105-
url=span.tags.pop(ext.HTTP_URL, ""),
106-
method=span.tags.pop(ext.HTTP_METHOD, ""),
105+
url=span.tags.pop(ext.HTTP_URL, None),
106+
method=span.tags.pop(ext.HTTP_METHOD, None),
107107
status=span.tags.pop(ext.HTTP_STATUS_CODE, None),
108+
path_tpl=span.tags.pop("http.path_tpl", None),
108109
error=span.tags.pop('http.error', None))
109110

110111
if span.operation_name == "rabbitmq":

0 commit comments

Comments
 (0)