cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Merge Azure App Service Slots into same service

rafaelmiranda
Frequent Guest

Hi,

I'm integrating Dynatrace with Azure App Service and works ok except when I have multiple service slots.
I have an app MyApp and each slot have different application ids and consequently are being shown as different services:

- MyApp

- myapp__b123

 

I'm using service detection rules to improve detection and I'm able to remove the suffix:

"applicationId": {
    "enableIdContributor": true,
    "serviceIdContributor": {
        "contributionType": "TransformValue",
        "transformations": [
            {
                "transformationType": "SPLIT_SELECT",
                "splitDelimiter": "__",
                "selectIndex": 1
            }
        ]
    }
},

But I'm still struggling with the casing. I wish I could use a case insensitive rule or at least override the ApplicationId with a environment variable.

I tried using DT_APPLICATIONID but apparently it only works when the service does not have an existing application id.

4 REPLIES 4

IzabelaRokita
Community Team
Community Team

Hey @rafaelmiranda 
Are you still facing this issue, or have you found a solution already?
Let me know so we can discuss the next steps 🙂 

NeJoyer
Contributor

Did you figure out a solution?

Peter_Youssef
Champion

Hello @rafaelmiranda 

  • Previously, there was a capability for services merging.
  • As of now, You can proceed with external web services rules and external web request rules configurations as per the available conditions it should fix.

Hoping it helps.

BR,

Peter

NeJoyer
Contributor

I found that I was able to combine the two services (one for my production slot and one for my "vNext" slot) into one service that includes the traces, metrics for both slots.

I did this by creating a web service detection rule that overrides the service name to be my service name (in your example "myapp").
Then I created an Advanced Process Detection rule which does something similar by truncating the name of the process (using the "Delimit To" option). That was sufficient for getting the services to be combined.

For bonus points then, I set a "DT_RELEASE_STAGE" environment variable to "Prod" for the prod slot and "VNEXT" for my vnext slot. I made those settings sticky so that they stick to the slot and don't get swapped when the slots are swapped.
This gives you the ability to break out the data in the Dynatrace UI between the slots (even though they are combined into one service).

Featured Posts