File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ def handle_agent_tasks(self, task):
201
201
def collect_snapshot (self ):
202
202
""" Collects snapshot related information to this process and environment """
203
203
try :
204
- if "FLASK_APP" in os .environ :
204
+ if "INSTANA_SERVICE_NAME" in os .environ :
205
+ appname = os .environ ["INSTANA_SERVICE_NAME" ]
206
+ elif "FLASK_APP" in os .environ :
205
207
appname = os .environ ["FLASK_APP" ]
206
208
elif "DJANGO_SETTINGS_MODULE" in os .environ :
207
209
appname = os .environ ["DJANGO_SETTINGS_MODULE" ].split ('.' )[0 ]
Original file line number Diff line number Diff line change 3
3
4
4
5
5
class Options (object ):
6
- service = ''
6
+ service = None
7
7
service_name = None
8
8
agent_host = ''
9
9
agent_port = 0
Original file line number Diff line number Diff line change @@ -191,7 +191,8 @@ def build_sdk_span(self, span):
191
191
custom = custom_data )
192
192
193
193
sdk_data .Type = self .get_span_kind (span )
194
- data = Data (service = self .get_service_name (span ), sdk = sdk_data )
194
+ data = Data (service = instana .singletons .agent .sensor .options .service_name ,
195
+ sdk = sdk_data )
195
196
entity_from = {'e' : instana .singletons .agent .from_ .pid ,
196
197
'h' : instana .singletons .agent .from_ .agentUuid }
197
198
@@ -225,9 +226,6 @@ def get_http_host_name(self, span):
225
226
226
227
return "localhost"
227
228
228
- def get_service_name (self , span ):
229
- return instana .singletons .agent .sensor .options .service_name
230
-
231
229
def get_span_kind (self , span ):
232
230
kind = ""
233
231
if "span.kind" in span .tags :
You can’t perform that action at this time.
0 commit comments