From eb78e3a72a0382fd2c08d83ffcf54a0f05042324 Mon Sep 17 00:00:00 2001 From: Peter Giacomo Lombardo Date: Thu, 2 May 2019 12:59:51 +0200 Subject: [PATCH 1/3] Remove unnecessary; better announce log --- instana/fsm.py | 3 +-- instana/instrumentation/tornado/__init___.py | 0 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 instana/instrumentation/tornado/__init___.py diff --git a/instana/fsm.py b/instana/fsm.py index e1b14696..5b01797b 100644 --- a/instana/fsm.py +++ b/instana/fsm.py @@ -81,7 +81,6 @@ def reset(self): self.fsm.lookup() def lookup_agent_host(self, e): - logger.debug("lookup_agent_host") host, port = self.__get_agent_host_port() if self.agent.is_agent_listening(host, port): @@ -147,7 +146,7 @@ def announce_sensor(self, e): if response and (response.status_code is 200) and (len(response.content) > 2): self.agent.set_from(response.content) self.fsm.pending() - logger.debug("Announced pid: %s (true pid: %s) Waiting for Agent Ready" % (str(pid), str(self.agent.from_.pid))) + logger.debug("Announced pid: %s (true pid: %s). Waiting for Agent Ready..." % (str(pid), str(self.agent.from_.pid))) return True else: logger.debug("Cannot announce sensor. Scheduling retry.") diff --git a/instana/instrumentation/tornado/__init___.py b/instana/instrumentation/tornado/__init___.py new file mode 100644 index 00000000..e69de29b From ba818f3e64923883ff313d4f6837685c7b07e9b5 Mon Sep 17 00:00:00 2001 From: Peter Giacomo Lombardo Date: Thu, 2 May 2019 14:01:11 +0200 Subject: [PATCH 2/3] More Perty --- instana/agent.py | 4 ++-- instana/fsm.py | 3 +-- instana/sensor.py | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/instana/agent.py b/instana/agent.py index b69cbacd..9514ab2a 100644 --- a/instana/agent.py +++ b/instana/agent.py @@ -123,10 +123,10 @@ def is_agent_listening(self, host, port): logger.debug("Host agent found on %s:%d" % (host, port)) rv = True else: - logger.debug("...something is listening on %s:%d but it's not the Instana Agent: %s" + logger.debug("...something is listening on %s:%d but it's not the Instana Host Agent: %s" % (host, port, server_header)) except (requests.ConnectTimeout, requests.ConnectionError): - logger.debug("No host agent listening on %s:%d" % (host, port)) + logger.debug("Instana Host Agent not found on %s:%d" % (host, port)) rv = False finally: return rv diff --git a/instana/fsm.py b/instana/fsm.py index 5b01797b..7bbb961e 100644 --- a/instana/fsm.py +++ b/instana/fsm.py @@ -105,7 +105,7 @@ def lookup_agent_host(self, e): return False def announce_sensor(self, e): - logger.debug("announcing sensor to the agent") + logger.debug("Announcing sensor to the agent") sock = None pid = os.getpid() cmdline = [] @@ -154,7 +154,6 @@ def announce_sensor(self, e): return False def schedule_retry(self, fun, e, name): - logger.debug("Scheduling: " + name) self.timer = t.Timer(self.RETRY_PERIOD, fun, [e]) self.timer.daemon = True self.timer.name = name diff --git a/instana/sensor.py b/instana/sensor.py index 770dfa6c..1fa96af3 100644 --- a/instana/sensor.py +++ b/instana/sensor.py @@ -17,7 +17,6 @@ def __init__(self, agent, options=None): self.agent = agent self.meter = Meter(agent) - logger.debug("initialized sensor") def set_options(self, options): self.options = options From a0392589f6f520a1d86433839a45ad28d2b528b9 Mon Sep 17 00:00:00 2001 From: Peter Giacomo Lombardo Date: Thu, 2 May 2019 14:32:46 +0200 Subject: [PATCH 3/3] Travis: Force Trusty due to Rabbitmq not supported on others --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 981600ba..4ec43e36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: python +dist: trusty + python: - "2.7" - "3.4"