diff --git a/agent/agent-bootstrap/gradle.lockfile b/agent/agent-bootstrap/gradle.lockfile index 1acce42f7e7..6e758a8de08 100644 --- a/agent/agent-bootstrap/gradle.lockfile +++ b/agent/agent-bootstrap/gradle.lockfile @@ -11,10 +11,10 @@ com.google.guava:guava-bom:31.1-jre=runtimeClasspath com.squareup.moshi:moshi:1.11.0=runtimeClasspath com.squareup.okio:okio:1.17.5=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java b/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java index 64d32f8f2e5..49433e6da6a 100644 --- a/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java +++ b/agent/agent-bootstrap/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/http/TemporaryMetricsView.java @@ -62,7 +62,7 @@ private static Set buildDurationServerView() { view.add(SemanticAttributes.NET_HOST_PORT); view.add(SemanticAttributes.HTTP_ROUTE); // START APPLICATION INSIGHTS MODIFICATIONS - view.add(SemanticAttributes.HTTP_USER_AGENT); + view.add(SemanticAttributes.USER_AGENT_ORIGINAL); // END APPLICATION INSIGHTS MODIFICATIONS return view; } diff --git a/agent/agent-for-testing/gradle.lockfile b/agent/agent-for-testing/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/agent-for-testing/gradle.lockfile +++ b/agent/agent-for-testing/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile index a80041a44d4..1baba83ff56 100644 --- a/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.errorprone:error_prone_annotations:2.18.0=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile index a80041a44d4..1baba83ff56 100644 --- a/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.errorprone:error_prone_annotations:2.18.0=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile b/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile +++ b/agent/agent-gc-monitor/gc-monitor-tests/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/agent-profiler/agent-alerting-api/gradle.lockfile b/agent/agent-profiler/agent-alerting-api/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/agent-profiler/agent-alerting-api/gradle.lockfile +++ b/agent/agent-profiler/agent-alerting-api/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/agent-profiler/agent-alerting/gradle.lockfile b/agent/agent-profiler/agent-alerting/gradle.lockfile index b814270e69b..12dc0cb1db4 100644 --- a/agent/agent-profiler/agent-alerting/gradle.lockfile +++ b/agent/agent-profiler/agent-alerting/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile b/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile +++ b/agent/agent-profiler/agent-diagnostics-api/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/agent-tooling/gradle.lockfile b/agent/agent-tooling/gradle.lockfile index bc3b216bca5..7e294cac85a 100644 --- a/agent/agent-tooling/gradle.lockfile +++ b/agent/agent-tooling/gradle.lockfile @@ -50,13 +50,13 @@ io.netty:netty-transport-native-epoll:4.1.91.Final=runtimeClasspath io.netty:netty-transport-native-kqueue:4.1.91.Final=runtimeClasspath io.netty:netty-transport-native-unix-common:4.1.91.Final=runtimeClasspath io.netty:netty-transport:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath -io.projectreactor.netty:reactor-netty-core:1.1.5=runtimeClasspath -io.projectreactor.netty:reactor-netty-http:1.1.5=runtimeClasspath -io.projectreactor:reactor-core:3.5.4=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath +io.projectreactor.netty:reactor-netty-core:1.1.6=runtimeClasspath +io.projectreactor.netty:reactor-netty-http:1.1.6=runtimeClasspath +io.projectreactor:reactor-core:3.5.5=runtimeClasspath net.java.dev.jna:jna-platform:5.13.0=runtimeClasspath net.java.dev.jna:jna:5.13.0=runtimeClasspath net.minidev:accessors-smart:2.4.9=runtimeClasspath diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/FirstEntryPoint.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/FirstEntryPoint.java index 3fdbbf77f35..83e1195c946 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/FirstEntryPoint.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/FirstEntryPoint.java @@ -66,6 +66,11 @@ public static String getAgentVersion() { return agentVersion; } + @Override + public String name() { + return "applicationinsights"; + } + @Override public void init() { try { diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/Slf4jInternalLogger.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/Slf4jInternalLogger.java index 2a569f645af..a24768d2c55 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/Slf4jInternalLogger.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/Slf4jInternalLogger.java @@ -8,7 +8,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class Slf4jInternalLogger extends InternalLogger { +public class Slf4jInternalLogger implements InternalLogger { static Slf4jInternalLogger create(String name) { return new Slf4jInternalLogger(name); @@ -21,7 +21,7 @@ static Slf4jInternalLogger create(String name) { } @Override - protected boolean isLoggable(InternalLogger.Level level) { + public boolean isLoggable(Level level) { switch (level) { case TRACE: return logger.isTraceEnabled(); @@ -38,7 +38,7 @@ protected boolean isLoggable(InternalLogger.Level level) { } @Override - protected void log(InternalLogger.Level level, String message, @Nullable Throwable error) { + public void log(Level level, String message, @Nullable Throwable error) { switch (level) { case TRACE: logger.trace(message, error); @@ -60,7 +60,7 @@ protected void log(InternalLogger.Level level, String message, @Nullable Throwab } @Override - protected String name() { + public String name() { return logger.getName(); } } diff --git a/agent/agent-tooling/src/main/java/io/opentelemetry/sdk/metrics/internal/view/UserAgents.java b/agent/agent-tooling/src/main/java/io/opentelemetry/sdk/metrics/internal/view/UserAgents.java index 6b038e5eb3a..e440a26a8f5 100644 --- a/agent/agent-tooling/src/main/java/io/opentelemetry/sdk/metrics/internal/view/UserAgents.java +++ b/agent/agent-tooling/src/main/java/io/opentelemetry/sdk/metrics/internal/view/UserAgents.java @@ -9,7 +9,7 @@ final class UserAgents { static boolean isBot(Attributes attributes) { - String userAgent = attributes.get(SemanticAttributes.HTTP_USER_AGENT); + String userAgent = attributes.get(SemanticAttributes.USER_AGENT_ORIGINAL); return userAgent != null && userAgent.contains("AlwaysOn"); } diff --git a/agent/agent/gradle.lockfile b/agent/agent/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/agent/gradle.lockfile +++ b/agent/agent/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/agent/src/main/java/com/microsoft/applicationinsights/agent/Agent.java b/agent/agent/src/main/java/com/microsoft/applicationinsights/agent/Agent.java index 2fb9df54e06..5fda9929bf5 100644 --- a/agent/agent/src/main/java/com/microsoft/applicationinsights/agent/Agent.java +++ b/agent/agent/src/main/java/com/microsoft/applicationinsights/agent/Agent.java @@ -28,6 +28,13 @@ public static void premain(String agentArgs, Instrumentation inst) { StartupProfiler.start(); } + // https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7339 + // Starting 1.25.0, OpenTelemetry defaults logger to Slf4jSimplerlogger when system property + // "otel.javaagent.logging" is null. + // Setting this system property programmatically will tell agent class loader to load our + // Slf4jInternalLogger instead. + System.setProperty("otel.javaagent.logging", "applicationinsights"); + OpenTelemetryAgent.premain(agentArgs, inst); } diff --git a/agent/azure-monitor-exporter/gradle.lockfile b/agent/azure-monitor-exporter/gradle.lockfile index 3158fe1e283..e77a6f624a4 100644 --- a/agent/azure-monitor-exporter/gradle.lockfile +++ b/agent/azure-monitor-exporter/gradle.lockfile @@ -40,13 +40,13 @@ io.netty:netty-transport-native-epoll:4.1.91.Final=runtimeClasspath io.netty:netty-transport-native-kqueue:4.1.91.Final=runtimeClasspath io.netty:netty-transport-native-unix-common:4.1.91.Final=runtimeClasspath io.netty:netty-transport:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath -io.projectreactor.netty:reactor-netty-core:1.1.5=runtimeClasspath -io.projectreactor.netty:reactor-netty-http:1.1.5=runtimeClasspath -io.projectreactor:reactor-core:3.5.4=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath +io.projectreactor.netty:reactor-netty-core:1.1.6=runtimeClasspath +io.projectreactor.netty:reactor-netty-http:1.1.6=runtimeClasspath +io.projectreactor:reactor-core:3.5.5=runtimeClasspath net.java.dev.jna:jna-platform:5.6.0=runtimeClasspath net.java.dev.jna:jna:5.6.0=runtimeClasspath net.minidev:accessors-smart:2.4.9=runtimeClasspath diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/LogDataMapper.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/LogDataMapper.java index 1a6bea48ab3..de726c7ecb2 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/LogDataMapper.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/LogDataMapper.java @@ -3,6 +3,7 @@ package com.azure.monitor.opentelemetry.exporter.implementation; +import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import com.azure.core.util.logging.ClientLogger; @@ -20,6 +21,7 @@ import io.opentelemetry.api.trace.SpanContext; import io.opentelemetry.sdk.logs.data.LogRecordData; import io.opentelemetry.sdk.resources.Resource; +import java.util.List; import java.util.function.BiConsumer; import reactor.util.annotation.Nullable; @@ -35,7 +37,7 @@ public class LogDataMapper { private static final String LOG4J_MAP_MESSAGE_PREFIX = "log4j.map_message."; // log4j 2.x private static final AttributeKey LOG4J_MARKER = stringKey("log4j.marker"); - private static final AttributeKey LOGBACK_MARKER = stringKey("logback.marker"); + private static final AttributeKey> LOGBACK_MARKER = stringArrayKey("logback.marker"); private static final Mappings MAPPINGS; @@ -77,7 +79,7 @@ public class LogDataMapper { .exactString(SemanticAttributes.CODE_FUNCTION, "MethodName") .exactLong(SemanticAttributes.CODE_LINENO, "LineNumber") .exactString(LOG4J_MARKER, "Marker") - .exactString(LOGBACK_MARKER, "Marker"); + .exactStringArray(LOGBACK_MARKER, "Marker"); SpanDataMapper.applyCommonTags(mappingsBuilder); diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/MappingsBuilder.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/MappingsBuilder.java index ef229ae599c..6a9b4588352 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/MappingsBuilder.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/MappingsBuilder.java @@ -10,6 +10,7 @@ import io.opentelemetry.api.common.AttributeKey; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; @@ -86,6 +87,17 @@ MappingsBuilder exactLong(AttributeKey attributeKey, String propertyName) return this; } + MappingsBuilder exactStringArray(AttributeKey> attributeKey, String propertyName) { + exactMappings.put( + attributeKey.getKey(), + (telemetryBuilder, value) -> { + if (value instanceof List) { + telemetryBuilder.addProperty(propertyName, String.join(",", (List) value)); + } + }); + return this; + } + public Mappings build() { return new Mappings(exactMappings, prefixMappings.build()); } diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java index b6e490d2a1f..50adfd00107 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SemanticAttributes.java @@ -603,7 +603,7 @@ public final class SemanticAttributes { * Value of the HTTP * User-Agent header sent by the client. */ - public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); + public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); /** * The size of the request payload body in bytes. This is the number of bytes transferred diff --git a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java index 3abc1c99fd9..7a2e72b0ce0 100644 --- a/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java +++ b/agent/azure-monitor-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/implementation/SpanDataMapper.java @@ -75,7 +75,7 @@ public final class SpanDataMapper { .ignoreExact(AiSemanticAttributes.KAFKA_RECORD_QUEUE_TIME_MS.getKey()) .ignoreExact(AiSemanticAttributes.KAFKA_OFFSET.getKey()) .exact( - SemanticAttributes.HTTP_USER_AGENT.getKey(), + SemanticAttributes.USER_AGENT_ORIGINAL.getKey(), (builder, value) -> { if (value instanceof String) { builder.addTag("ai.user.userAgent", (String) value); diff --git a/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile b/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile +++ b/agent/instrumentation/applicationinsights-web-2.3/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile b/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile +++ b/agent/instrumentation/azure-functions-worker-stub/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/instrumentation/azure-functions/gradle.lockfile b/agent/instrumentation/azure-functions/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/instrumentation/azure-functions/gradle.lockfile +++ b/agent/instrumentation/azure-functions/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/instrumentation/methods/gradle.lockfile b/agent/instrumentation/methods/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/instrumentation/methods/gradle.lockfile +++ b/agent/instrumentation/methods/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java b/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java index 3b1717f5b06..684c6bd6d42 100644 --- a/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java +++ b/agent/instrumentation/methods/src/main/java/io/opentelemetry/javaagent/instrumentation/methods/ai/MethodSingletons.java @@ -33,7 +33,8 @@ public final class MethodSingletons { GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, CodeSpanNameExtractor.create(codeAttributesGetter)) - .setInstrumentationVersion("1.23.0-alpha-applicationinsights") + .setInstrumentationVersion( + "1.25.0-alpha-applicationinsights") // TODO automate version or use upstream .addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter)) // START APPLICATION INSIGHTS MODIFICATIONS .buildInstrumenter(new MethodSpanKindExtractor()); diff --git a/agent/instrumentation/micrometer-1.0/gradle.lockfile b/agent/instrumentation/micrometer-1.0/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/agent/instrumentation/micrometer-1.0/gradle.lockfile +++ b/agent/instrumentation/micrometer-1.0/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/agent/runtime-attach/gradle.lockfile b/agent/runtime-attach/gradle.lockfile index 81b0c2bb096..6e914e0c4d2 100644 --- a/agent/runtime-attach/gradle.lockfile +++ b/agent/runtime-attach/gradle.lockfile @@ -6,10 +6,10 @@ com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath io.opentelemetry.contrib:opentelemetry-runtime-attach-core:1.18.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath net.bytebuddy:byte-buddy-agent:1.11.18=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/classic-sdk/core/gradle.lockfile b/classic-sdk/core/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/classic-sdk/core/gradle.lockfile +++ b/classic-sdk/core/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/classic-sdk/web/gradle.lockfile b/classic-sdk/web/gradle.lockfile index a398f1e2719..4d1b2cdf810 100644 --- a/classic-sdk/web/gradle.lockfile +++ b/classic-sdk/web/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath empty= diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index 8d06f4a50da..7fbb2899481 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -11,9 +11,9 @@ data class DependencySet(val group: String, val version: String, val modules: Li val dependencyVersions = hashMapOf() rootProject.extra["versions"] = dependencyVersions -val otelVersion = "1.23.1" -val otelInstrumentationAlphaVersion = "1.24.0-alpha" -val otelInstrumentationVersion = "1.24.0" +val otelVersion = "1.25.0" +val otelInstrumentationAlphaVersion = "1.25.0-alpha" +val otelInstrumentationVersion = "1.25.0" val otelContribAlphaVersion = "1.18.0-alpha" rootProject.extra["otelVersion"] = otelVersion diff --git a/etw/java/gradle.lockfile b/etw/java/gradle.lockfile index b814270e69b..12dc0cb1db4 100644 --- a/etw/java/gradle.lockfile +++ b/etw/java/gradle.lockfile @@ -5,10 +5,10 @@ com.azure:azure-sdk-bom:1.2.11=runtimeClasspath com.fasterxml.jackson:jackson-bom:2.14.2=runtimeClasspath com.google.guava:guava-bom:31.1-jre=runtimeClasspath io.netty:netty-bom:4.1.91.Final=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.24.0-alpha=runtimeClasspath -io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.24.0=runtimeClasspath -io.opentelemetry:opentelemetry-bom-alpha:1.23.1-alpha=runtimeClasspath -io.opentelemetry:opentelemetry-bom:1.23.1=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom:1.25.0=runtimeClasspath +io.opentelemetry:opentelemetry-bom-alpha:1.25.0-alpha=runtimeClasspath +io.opentelemetry:opentelemetry-bom:1.25.0=runtimeClasspath org.junit:junit-bom:5.9.2=runtimeClasspath org.slf4j:slf4j-api:1.7.36=runtimeClasspath org.testcontainers:testcontainers-bom:1.18.0=runtimeClasspath diff --git a/licenses/more-licenses.md b/licenses/more-licenses.md index 845ca82570a..f970ff79231 100644 --- a/licenses/more-licenses.md +++ b/licenses/more-licenses.md @@ -1,7 +1,7 @@ #agent ##Dependency License Report -_2023-04-12 15:55:54 UTC_ +_2023-04-19 19:07:48 PDT_ ## Apache License, Version 2.0 **1** **Group:** `com.fasterxml.jackson.core` **Name:** `jackson-annotations` **Version:** `2.14.2`