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):
201201 def collect_snapshot (self ):
202202 """ Collects snapshot related information to this process and environment """
203203 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 :
205207 appname = os .environ ["FLASK_APP" ]
206208 elif "DJANGO_SETTINGS_MODULE" in os .environ :
207209 appname = os .environ ["DJANGO_SETTINGS_MODULE" ].split ('.' )[0 ]
Original file line number Diff line number Diff line change 33
44
55class Options (object ):
6- service = ''
6+ service = None
77 service_name = None
88 agent_host = ''
99 agent_port = 0
Original file line number Diff line number Diff line change @@ -191,7 +191,8 @@ def build_sdk_span(self, span):
191191 custom = custom_data )
192192
193193 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 )
195196 entity_from = {'e' : instana .singletons .agent .from_ .pid ,
196197 'h' : instana .singletons .agent .from_ .agentUuid }
197198
@@ -225,9 +226,6 @@ def get_http_host_name(self, span):
225226
226227 return "localhost"
227228
228- def get_service_name (self , span ):
229- return instana .singletons .agent .sensor .options .service_name
230-
231229 def get_span_kind (self , span ):
232230 kind = ""
233231 if "span.kind" in span .tags :
You can’t perform that action at this time.
0 commit comments