diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/utils/PropertyHelper.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/utils/PropertyHelper.java index 74de0ce2f84d1..87d75869dbd0d 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/utils/PropertyHelper.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/utils/PropertyHelper.java @@ -116,10 +116,21 @@ public static String getRpIntegrationSdkNamePrefix() { logger.warn("could not detect os: {}", System.getProperty("os.name")); sdkNamePrefix.append("u"); } + + sdkNamePrefix.append(getRpAttachTypeChar()); sdkNamePrefix.append("_"); return sdkNamePrefix.toString(); } + private static char getRpAttachTypeChar() { + if (RpAttachType.getRpAttachType() == RpAttachType.INTEGRATED_AUTO) { + return 'i'; + } else if (RpAttachType.getRpAttachType() == RpAttachType.STANDALONE_AUTO) { + return 'a'; + } + return 'm'; // Manual (This is the default when RP integration is not used) + } + private static class SdkPropertyValues { private static final String SDK_VERSION_NUMBER; private static volatile String sdkVersionString;