File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ The sensor tries to communicate with the Instana agent via IP 127.0.0.1 and as a
77To use these, these environment variables should be set in the environment of the running Python process.
88
99``` shell
10- export INSTANA_AGENT_IP = ' 127.0.0.1'
10+ export INSTANA_AGENT_HOST = ' 127.0.0.1'
1111export INSTANA_AGENT_PORT = ' 42699'
1212```
1313
Original file line number Diff line number Diff line change @@ -70,7 +70,14 @@ def lookup_agent_host(self, e):
7070 host = a .AGENT_DEFAULT_HOST
7171 port = a .AGENT_DEFAULT_PORT
7272
73- if "INSTANA_AGENT_IP" in os .environ :
73+ if "INSTANA_AGENT_HOST" in os .environ :
74+ host = os .environ ["INSTANA_AGENT_HOST" ]
75+ if "INSTANA_AGENT_PORT" in os .environ :
76+ port = int (os .environ ["INSTANA_AGENT_PORT" ])
77+
78+ elif "INSTANA_AGENT_IP" in os .environ :
79+ # Deprecated: INSTANA_AGENT_IP environment variable
80+ # To be removed in a future version
7481 host = os .environ ["INSTANA_AGENT_IP" ]
7582 if "INSTANA_AGENT_PORT" in os .environ :
7683 port = int (os .environ ["INSTANA_AGENT_PORT" ])
Original file line number Diff line number Diff line change @@ -16,8 +16,13 @@ def __init__(self, **kwds):
1616 self .log_level = logging .DEBUG
1717
1818 if "INSTANA_AGENT_IP" in os .environ :
19+ # Deprecated: INSTANA_AGENT_IP environment variable
20+ # To be removed in a future version
1921 self .agent_host = os .environ ["INSTANA_AGENT_IP" ]
2022
23+ if "INSTANA_AGENT_HOST" in os .environ :
24+ self .agent_host = os .environ ["INSTANA_AGENT_HOST" ]
25+
2126 if "INSTANA_AGENT_PORT" in os .environ :
2227 self .agent_port = os .environ ["INSTANA_AGENT_PORT" ]
2328
You can’t perform that action at this time.
0 commit comments