Skip to content

Commit 2b9c7d2

Browse files
committed
Check Azure Spring Cloud before AKS in RP integration
1 parent e4572b7 commit 2b9c7d2

File tree

1 file changed

+4
-4
lines changed
  • agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/diagnostics

1 file changed

+4
-4
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/diagnostics/DiagnosticsHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ public static void initRpIntegration(Path agentPath) {
4747
if (RpAttachType.INTEGRATED_AUTO.equals(RpAttachType.getRpAttachType())) {
4848
appSvcRpIntegratedAuto = true;
4949
}
50+
} else if (!Strings.isNullOrEmpty(
51+
System.getenv("APPLICATIONINSIGHTS_SPRINGCLOUD_SERVICE_ID"))) {
52+
PropertyHelper.setRpIntegrationChar('s');
53+
setRpAttachType(agentPath, "springcloud.codeless");
5054
} else if (!Strings.isNullOrEmpty(System.getenv("AKS_ARM_NAMESPACE_ID"))) {
5155
// AKS_ARM_NAMESPACE_ID is an env var available in AKS only and it's also used as the AKS
5256
// attach rate numerator
5357
PropertyHelper.setRpIntegrationChar('k');
5458
setRpAttachType(agentPath, "aks.codeless");
55-
} else if (!Strings.isNullOrEmpty(
56-
System.getenv("APPLICATIONINSIGHTS_SPRINGCLOUD_SERVICE_ID"))) {
57-
PropertyHelper.setRpIntegrationChar('s');
58-
setRpAttachType(agentPath, "springcloud.codeless");
5959
} else {
6060
RpAttachType.setRpAttachType(RpAttachType.STANDALONE_AUTO); // default
6161
}

0 commit comments

Comments
 (0)