Skip to content

Commit 654d979

Browse files
committed
feat: Add option to disable package collection
Signed-off-by: Ferenc Géczi <[email protected]>
1 parent 6e81d52 commit 654d979

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

instana/collector/helpers/runtime.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def _collect_runtime_snapshot(self, plugin_data):
201201

202202
def gather_python_packages(self):
203203
""" Collect up the list of modules in use """
204-
versions = dict()
204+
if os.environ.get('INSTANA_DISABLE_PYTHON_PACKAGE_COLLECTION'):
205+
return {'instana': VERSION}
206+
205207
try:
206208
sys_packages = sys.modules.copy()
207209

0 commit comments

Comments
 (0)