Skip to content

Commit fc35b17

Browse files
committed
Hook & probe initializers.
1 parent 4b634ae commit fc35b17

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

gdbinit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
call PyGILState_Ensure()
2+
call PyRun_SimpleString("import sys; sys.path.insert(0, '/tmp/instana/python');")
3+
call PyRun_SimpleString("exec(open(\"/tmp/instana/python/python-sensor/instana/probe.py\").read())")
4+
call PyGILState_Release($1)

instana/probe.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import opentracing as ot
2+
from instana import tracer, options
3+
4+
# This file is the hook for autoinstrumenation.
5+
# Here, we should:
6+
# 1. Make sure instana sensor is not already active in the process
7+
# 2. Activate properly
8+
# a. Runtime metrics
9+
# b. Detect and instrument framework
10+
# c. Detect and instrument any libraries
11+
12+
opts = options.Options()
13+
ot.global_tracer = tracer.InstanaTracer(opts)

0 commit comments

Comments
 (0)