Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions instana/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def build_registered_span(self, span):
data.custom.logs = logs

if span.operation_name in self.http_spans:
data.http = HttpData(host=self.get_http_host_name(span),
data.http = HttpData(host=span.tags.pop("http.host", None),
url=span.tags.pop(ext.HTTP_URL, None),
params=span.tags.pop('http.params', None),
method=span.tags.pop(ext.HTTP_METHOD, None),
Expand Down Expand Up @@ -248,17 +248,6 @@ def build_sdk_span(self, span):

return json_span

def get_http_host_name(self, span):
h = span.tags.pop("http.host", "")
if len(h) > 0:
return h

h = socket.gethostname()
if h and len(h) > 0:
return h

return "localhost"

def get_span_kind_as_string(self, span):
"""
Will retrieve the `span.kind` tag and return the appropriate string value for the Instana backend or
Expand Down