Skip to content

Commit 355d21a

Browse files
committed
Show current thread on error.
1 parent 6311aaa commit 355d21a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

instana/agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import instana.log as l
33
import instana.fsm as f
44
import instana.agent_const as a
5+
import threading
56

67
try:
78
import urllib.request as urllib2
@@ -76,6 +77,7 @@ def full_request_response(self, url, method, o, body, header):
7677
request = urllib2.Request(url, self.to_json(o))
7778
request.add_header("Content-Type", "application/json")
7879

80+
# print self.to_json(o)
7981
response = urllib2.urlopen(request, timeout=2)
8082

8183
if not response:
@@ -96,7 +98,7 @@ def full_request_response(self, url, method, o, body, header):
9698
if method == "HEAD":
9799
b = True
98100
except Exception as e:
99-
l.error("full_request_response: " + str(e))
101+
l.error("%s: full_request_response: %s" % (threading.current_thread().name, str(e)))
100102

101103
return (b, h)
102104

0 commit comments

Comments
 (0)