File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11import subprocess
22import os
3- import sys
3+ import psutil
44import threading as t
55import fysom as f
66import instana .log as l
@@ -91,10 +91,10 @@ def check_host(self, host):
9191
9292 def announce_sensor (self , e ):
9393 l .debug ("announcing sensor to the agent" )
94-
95- d = Discovery (pid = os . getpid () ,
96- name = sys . executable ,
97- args = sys . argv [ 0 :])
94+ p = psutil . Process ( os . getpid ())
95+ d = Discovery (pid = p . pid ,
96+ name = p . cmdline ()[ 0 ] ,
97+ args = p . cmdline ()[ 1 :])
9898
9999 (b , _ ) = self .agent .request_response (
100100 self .agent .make_url (a .AGENT_DISCOVERY_URL ), "PUT" , d )
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ nose>=1.0
22fysom >= 2.1.2
33opentracing >= 1.2.1
44basictracer >= 2.2.0
5+ psutil >= 5.1.3
Original file line number Diff line number Diff line change 1313 setup_requires = ['nose>=1.0' ,
1414 'fysom>=2.1.2' ,
1515 'opentracing>=1.2.1,<1.3' ,
16- 'basictracer>=2.2.0' ],
16+ 'basictracer>=2.2.0' ,
17+ 'psutil>=5.1.3' ],
1718 test_suite = 'nose.collector' )
You can’t perform that action at this time.
0 commit comments