Splunk AppDynamics

How can I provide different account keys for different flavors?

Frode_Nilsen
Explorer

Hi we have an Android setup where we distinguish between production and test builds through the use of Android  Flavors. We also have two separate accounts at AppDynamics for Production and Test. How can I provide different set of credentials when everything seems to be done at compile time in a single build.gradle config setting like below?

adeum {
    account {
        name 'ourAccount'
        licenseKey '11111111-1111-1111-111111111111'
    }
}

Is it possible to set the credentials runtime instead?

Or parameterize this somehow dependent on flavors? Something like

adeum {
    account("test") {
        name 'ourTestAccount'
        licenseKey '11111111-1111-1111-111111111111'
    }
}
adeum {
    account("prod") {
        name 'ourProdAccount'
        licenseKey '22222222-2222-2222-222222222222'
    }
}
Labels (1)
0 Karma
1 Solution

Frode_Nilsen
Explorer

I might have misunderstood how accounts relate to environments in AppDynamics. Seems you can use the same account for multiple environments? With "environment" I mean whatever domain name comes in front of "*.saas.appdynamics.com". If this is correct then merely swapping App Key in 

Instrumentation.start(AgentConfiguration.builder()
.withAppKey(environmentSpecificKey))

..would do the trick - reusing the same "adeum" section in build.gradle for both

View solution in original post

Frode_Nilsen
Explorer

I might have misunderstood how accounts relate to environments in AppDynamics. Seems you can use the same account for multiple environments? With "environment" I mean whatever domain name comes in front of "*.saas.appdynamics.com". If this is correct then merely swapping App Key in 

Instrumentation.start(AgentConfiguration.builder()
.withAppKey(environmentSpecificKey))

..would do the trick - reusing the same "adeum" section in build.gradle for both

Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...