diff --git a/gdbinit b/gdbinit new file mode 100644 index 00000000..759228e9 --- /dev/null +++ b/gdbinit @@ -0,0 +1,4 @@ +call PyGILState_Ensure() +call PyRun_SimpleString("import sys; sys.path.insert(0, '/tmp/instana/python');") +call PyRun_SimpleString("exec(open(\"/tmp/instana/python/python-sensor/instana/probe.py\").read())") +call PyGILState_Release($1) diff --git a/instana/fsm.py b/instana/fsm.py index 946ce15e..1afe968d 100644 --- a/instana/fsm.py +++ b/instana/fsm.py @@ -86,7 +86,7 @@ def lookup_agent_host(self, e): self.fsm.announce() return True - log.warn("Instana Host Agent can't be found. Scheduling retry.") + log.info("Instana Host Agent couldn't be found. Scheduling retry.") self.schedule_retry(self.lookup_agent_host, e, "agent_lookup") return False @@ -144,11 +144,11 @@ def announce_sensor(self, e): if b: self.agent.set_from(b) self.fsm.ready() - log.warn("Host agent available. We're in business. Announced pid: %i (true pid: %i)" % + log.info("Host agent available. We're in business. Announced pid: %i (true pid: %i)" % (pid, self.agent.from_.pid)) return True else: - log.warn("Cannot announce sensor. Scheduling retry.") + log.debug("Cannot announce sensor. Scheduling retry.") self.schedule_retry(self.announce_sensor, e, "announce") return False diff --git a/instana/probe.py b/instana/probe.py new file mode 100644 index 00000000..6c401a82 --- /dev/null +++ b/instana/probe.py @@ -0,0 +1,13 @@ +import opentracing as ot +from instana import tracer, options + +# This file is the hook for autoinstrumenation. +# Here, we should: +# 1. Make sure instana sensor is not already active in the process +# 2. Activate properly +# a. Runtime metrics +# b. Detect and instrument framework +# c. Detect and instrument any libraries + +opts = options.Options() +ot.global_tracer = tracer.InstanaTracer(opts) diff --git a/setup.py b/setup.py index d8756b50..100aa226 100644 --- a/setup.py +++ b/setup.py @@ -23,9 +23,13 @@ test_suite='nose.collector', keywords=['performance', 'opentracing', 'metrics', 'monitoring'], classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', + 'Framework :: Django', + 'Framework :: Flask', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', + 'Intended Audience :: Science/Research', + 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', @@ -34,6 +38,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware', 'Topic :: System :: Monitoring', 'Topic :: System :: Networking :: Monitoring', 'Topic :: Software Development :: Libraries :: Python Modules'])