Good day. We are wanting to implement Dynatrace on our native iOS and Android mobile applications. We are utilizing a single build for each of our environments (ie. Dev, QA, UAT etc) which means that we want a separate Dynatrace instance for each environment. How do we set up the mobile apps to support multiple Dynatrace endpoints? Ie. if Dev, use this Dynatrace ID, if QA, use this Dynatrace ID. Thank you.
how/when does the mobile App know which environment is to be used? If this is available at application start time you can do a manual agent startup with the desired agent endpoint. Switching in-flight is a bit more tricky as it requires the agent to first completely shut down and then start again with the new endpoint which is not a use case the agent API is designed for... Also until the switch is performed all monitoring data is sent to the previously configured environment.
Hi Patrick. Appreciate your prompt response. The switching is done in-flight. The way the app is designed is the username is prefixed with a value that defines the environment. Obviously this prefix can not be utilized in production. As you described, how possible is it to shut down the agent and start with new agent? Is there some documentation that I can have a look at that will steer me?
this does not require an agent shutdown and relaunch, but it also does not capture any data before the agent is started (so only after user login).
If yo want to capture datat from app start you need to
As said I know this is not a perfect solution but the agent is not designed for in-flight endpoint switching. A better approach would be different builds for different environments.