diff --git a/.github/workflows/comment-on-asciidoc-changes.yml b/.github/workflows/comment-on-asciidoc-changes.yml new file mode 100644 index 0000000000..8e5f836b14 --- /dev/null +++ b/.github/workflows/comment-on-asciidoc-changes.yml @@ -0,0 +1,21 @@ +--- +name: Comment on PR for .asciidoc changes + +on: + # We need to use pull_request_target to be able to comment on PRs from forks + pull_request_target: + types: + - synchronize + - opened + - reopened + branches: + - main + - master + - "9.0" + +jobs: + comment-on-asciidoc-change: + permissions: + contents: read + pull-requests: write + uses: elastic/docs-builder/.github/workflows/comment-on-asciidoc-changes.yml@main diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 0bd0bf20f4..61a81a005f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -45,8 +45,8 @@ jobs: github-user: ${{ github.actor }} github-token: ${{ steps.get_token.outputs.token }} - - name: Add community and triage lables - if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' + - name: Add community and triage labels + if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' && github.actor != 'elastic-observability-automation[bot]' uses: actions/github-script@v7 with: script: | @@ -57,7 +57,7 @@ jobs: labels: ["community", "triage"] }) - name: Add comment for community PR - if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' + if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-renovate-prod[bot]' && github.actor != 'elastic-observability-automation[bot]' uses: wow-actions/auto-comment@v1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9873953b73..90a698be19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -216,8 +216,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'ci:agent-integration') || github.event.pull_request.draft == false || inputs.agent_integration_tests_ci == true - # Pinned to ubuntu 20.04 until https://github.com/elastic/apm-agent-java/issues/3035 is solved. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: build steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/microbenchmark.yml b/.github/workflows/microbenchmark.yml index f1814b2e4b..859eac4334 100644 --- a/.github/workflows/microbenchmark.yml +++ b/.github/workflows/microbenchmark.yml @@ -24,7 +24,7 @@ jobs: timeout-minutes: 5 steps: - name: Run microbenchmark - uses: elastic/oblt-actions/buildkite/run@v1.5.0 + uses: elastic/oblt-actions/buildkite/run@v1 env: JAVA_VERSION: ${{ inputs.java_version || 'openjdk-17+35-linux' }} with: diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml index b525aaec3a..a389aa2b65 100644 --- a/.github/workflows/release-step-3.yml +++ b/.github/workflows/release-step-3.yml @@ -105,7 +105,7 @@ jobs: run: tar xvf ${{ env.TARBALL_FILE }} - name: generate build provenance - uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3 + uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0 with: subject-path: "${{ github.workspace }}/**/target/*.jar" @@ -168,7 +168,7 @@ jobs: uses: ./.github/workflows/maven-goal with: command: ./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer - - uses: elastic/oblt-actions/aws/auth@v1.10.0 + - uses: elastic/oblt-actions/aws/auth@v1 with: aws-account-id: '267093732750' - name: Publish @@ -240,6 +240,8 @@ jobs: - name: Update major branch if: ${{ ! inputs.dry_run }} run: .ci/release/update-major-branch.sh ${{ env.RELEASE_VERSION }} + env: + GH_TOKEN: ${{ steps.get_token.outputs.token }} create-github-release: name: "Create GitHub Release" diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 7234cf16aa..d098c23a49 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -69,7 +69,7 @@ jobs: run: tar xvf ${{ env.TARBALL_FILE }} - name: generate build provenance - uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3 + uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0 with: subject-path: "${{ github.workspace }}/**/target/*.jar" diff --git a/.github/workflows/updatecli.yml b/.github/workflows/updatecli.yml index c8f4b4fb08..739fd40ffa 100644 --- a/.github/workflows/updatecli.yml +++ b/.github/workflows/updatecli.yml @@ -38,12 +38,14 @@ jobs: - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose diff + version-file: .tool-versions env: GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose apply + version-file: .tool-versions env: GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000000..c245dc5318 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +updatecli v0.94.1 \ No newline at end of file diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f9e5649743..2bc650e7de 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -34,6 +34,16 @@ Use subheadings with the "=====" level for adding notes for unreleased changes: [[release-notes-1.x]] === Java Agent version 1.x +[[release-notes-1.52.2]] +==== 1.52.2 - 2025/02/27 + +[float] +===== Bug fixes +* Prevent NPE in OpenTelemetry metrics bridge in case of asynchronous agent start - {pull}3880[#3880] +* Fix random Weblogic ClassNotFoundException related to thread context classloader - {pull}3870[#3870] +* Skips using NOFOLLOW_LINKS file open option when running on OS/400 as it's unsupported there - {pull}3905[#3905] +* Add framework name and version for Spring Webflux transactions - {pull}3936[#3936] + [[release-notes-1.52.1]] ==== 1.52.1 - 2024/11/18 diff --git a/Dockerfile.wolfi b/Dockerfile.wolfi index cab73524af..6daf85dad6 100644 --- a/Dockerfile.wolfi +++ b/Dockerfile.wolfi @@ -1,4 +1,4 @@ -FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f +FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:0801a437e721bebdd2d5be62e3f63f60fc9d1d82efacabe4c5b8792d74ae7006 RUN mkdir /usr/agent ARG JAR_FILE ARG HANDLER_FILE diff --git a/apm-agent-api/pom.xml b/apm-agent-api/pom.xml index 592a8db2f0..47f59995c9 100644 --- a/apm-agent-api/pom.xml +++ b/apm-agent-api/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-api diff --git a/apm-agent-attach-cli/pom.xml b/apm-agent-attach-cli/pom.xml index 2473a5b8b7..dc902acda2 100644 --- a/apm-agent-attach-cli/pom.xml +++ b/apm-agent-attach-cli/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-attach/pom.xml b/apm-agent-attach/pom.xml index 74807a7919..922e573550 100644 --- a/apm-agent-attach/pom.xml +++ b/apm-agent-attach/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-attach @@ -59,9 +59,6 @@ - - maven-jar-plugin - maven-dependency-plugin diff --git a/apm-agent-benchmarks/pom.xml b/apm-agent-benchmarks/pom.xml index d8676048d7..8417867d66 100644 --- a/apm-agent-benchmarks/pom.xml +++ b/apm-agent-benchmarks/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-benchmarks diff --git a/apm-agent-bootstrap/pom.xml b/apm-agent-bootstrap/pom.xml index d9faaeaff0..14b8922855 100644 --- a/apm-agent-bootstrap/pom.xml +++ b/apm-agent-bootstrap/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-bootstrap diff --git a/apm-agent-builds/apm-agent-java8/pom.xml b/apm-agent-builds/apm-agent-java8/pom.xml index 5ef284ae58..34b35d37cc 100644 --- a/apm-agent-builds/apm-agent-java8/pom.xml +++ b/apm-agent-builds/apm-agent-java8/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-builds - 1.52.1 + 1.52.2 apm-agent-java8 @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j-bom - 2.24.1 + 2.24.3 import pom diff --git a/apm-agent-builds/apm-agent/pom.xml b/apm-agent-builds/apm-agent/pom.xml index 0806d37132..2006ed36de 100644 --- a/apm-agent-builds/apm-agent/pom.xml +++ b/apm-agent-builds/apm-agent/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-builds - 1.52.1 + 1.52.2 apm-agent diff --git a/apm-agent-builds/pom.xml b/apm-agent-builds/pom.xml index 51fcdb28f7..3329c47e20 100644 --- a/apm-agent-builds/pom.xml +++ b/apm-agent-builds/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 @@ -314,7 +314,7 @@ ${project.groupId} - apm-rabbitmq-spring + apm-rabbitmq-spring5 ${project.version} diff --git a/apm-agent-cached-lookup-key/pom.xml b/apm-agent-cached-lookup-key/pom.xml index 4ac452fda6..070510cfb7 100644 --- a/apm-agent-cached-lookup-key/pom.xml +++ b/apm-agent-cached-lookup-key/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-common/pom.xml b/apm-agent-common/pom.xml index 56320091f7..eda99f3391 100644 --- a/apm-agent-common/pom.xml +++ b/apm-agent-common/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/JvmRuntimeInfo.java b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/JvmRuntimeInfo.java index d1b905b95a..8ddd83ee6b 100644 --- a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/JvmRuntimeInfo.java +++ b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/JvmRuntimeInfo.java @@ -39,6 +39,7 @@ public class JvmRuntimeInfo { private final boolean isHpUx; private final boolean isCoretto; private final boolean isZos; + private final boolean isOs400; public static JvmRuntimeInfo ofCurrentVM() { return CURRENT_VM; @@ -68,6 +69,7 @@ private JvmRuntimeInfo(String version, String vmName, String vendorName, @Nullab isHpUx = version.endsWith("-hp-ux"); isCoretto = vendorName != null && vendorName.contains("Amazon"); isZos = (osName != null) && osName.toLowerCase().contains("z/os"); + isOs400 = (osName != null) && osName.toLowerCase().contains("os/400"); if (isHpUx) { // remove extra hp-ux suffix for parsing @@ -153,7 +155,7 @@ public boolean isJ9VM() { return isJ9; } - public boolean isHpUx(){ + public boolean isHpUx() { return isHpUx; } @@ -173,6 +175,10 @@ public boolean isZos() { return isZos; } + public boolean isOs400() { + return isOs400; + } + @Override public String toString() { return String.format("%s %s %s", javaVersion, javaVmName, javaVmVersion); diff --git a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/AgentInfo.java b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/AgentInfo.java index dbd2b1a9de..648d78f575 100644 --- a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/AgentInfo.java +++ b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/AgentInfo.java @@ -37,7 +37,8 @@ public class AgentInfo { "com.lmax.disruptor", "com.dslplatform.json", "com.googlecode.concurrentlinkedhashmap", - "co.elastic.otel" + "co.elastic.otel", + "codes.rafael.asmjdkbridge" )); private static final Set agentRootPackages = new HashSet<>(Arrays.asList( diff --git a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/ResourceExtractionUtil.java b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/ResourceExtractionUtil.java index fcb4177ad3..be22567d85 100644 --- a/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/ResourceExtractionUtil.java +++ b/apm-agent-common/src/main/java/co/elastic/apm/agent/common/util/ResourceExtractionUtil.java @@ -101,9 +101,10 @@ public static synchronized Path extractResourceToDirectory(String resource, Stri } } } catch (FileAlreadyExistsException e) { - try (FileChannel channel = JvmRuntimeInfo.ofCurrentVM().isZos() ? - FileChannel.open(tempFile, READ) : - FileChannel.open(tempFile, READ, NOFOLLOW_LINKS)) { + JvmRuntimeInfo jvmRuntimeInfo = JvmRuntimeInfo.ofCurrentVM(); + try (FileChannel channel = (jvmRuntimeInfo.isZos() || jvmRuntimeInfo.isOs400()) ? + FileChannel.open(tempFile, READ) : + FileChannel.open(tempFile, READ, NOFOLLOW_LINKS)) { // wait until other JVM instances have fully written the file // multiple JVMs can read the file at the same time try (FileLock readLock = channel.lock(0, Long.MAX_VALUE, true)) { diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml index 7c16502299..1d6f49b8ae 100644 --- a/apm-agent-core/pom.xml +++ b/apm-agent-core/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-core @@ -58,11 +58,6 @@ jctools-core 4.0.5 - - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru - 1.4.2 - org.apache.logging.log4j diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/IndyBootstrap.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/IndyBootstrap.java index 659a5b8c23..3380bc1b06 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/IndyBootstrap.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/IndyBootstrap.java @@ -219,6 +219,7 @@ public class IndyBootstrap { static Method bootstrapLoggingMethod; private static final CallDepth callDepth = CallDepth.get(IndyBootstrap.class); + private static final CallDepth loggingForNestedCall = CallDepth.get("indy-bootstrap-nested-logging"); private static Logger logger() { // must not be a static field as it would initialize logging before it's ready @@ -430,7 +431,12 @@ private static ConstantCallSite internalBootstrap(MethodHandles.Lookup lookup, S // avoid re-entrancy and stack overflow errors // may happen when bootstrapping an instrumentation that also gets triggered during the bootstrap // for example, adding correlation ids to the thread context when executing logger.debug. - logger().warn("Nested instrumented invokedynamic instruction linkage detected", new Throwable()); + if (!loggingForNestedCall.isNestedCallAndIncrement()) { + // We might be unlucky and cause an infinite recurison through logger() + // for this reason we have the loggingForNestedCall in place to prevent this recursion + logger().warn("Nested instrumented invokedynamic instruction linkage detected", new Throwable()); + } + loggingForNestedCall.decrement(); return null; } String adviceClassName = (String) args[0]; @@ -498,7 +504,7 @@ private static ConstantCallSite internalBootstrap(MethodHandles.Lookup lookup, S // When calling findStatic now, the lookup class will be one that is loaded by the plugin class loader MethodHandle methodHandle = indyLookup.findStatic(adviceInPluginCL, adviceMethodName, adviceMethodType); return new ConstantCallSite(methodHandle); - } catch (Exception e) { + } catch (Throwable e) { logger().error(e.getMessage(), e); return null; } finally { diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java index 7c42ebc23e..3f9b0f504c 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java @@ -25,7 +25,13 @@ import co.elastic.apm.agent.matcher.MethodMatcherValueConverter; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; -import co.elastic.apm.agent.tracer.configuration.*; +import co.elastic.apm.agent.tracer.configuration.CoreConfiguration; +import co.elastic.apm.agent.tracer.configuration.ListValueConverter; +import co.elastic.apm.agent.tracer.configuration.RegexValidator; +import co.elastic.apm.agent.tracer.configuration.RoundedDoubleConverter; +import co.elastic.apm.agent.tracer.configuration.TimeDuration; +import co.elastic.apm.agent.tracer.configuration.TimeDurationValueConverter; +import co.elastic.apm.agent.tracer.configuration.WildcardMatcherValueConverter; import org.stagemonitor.configuration.ConfigurationOption; import org.stagemonitor.configuration.ConfigurationOptionProvider; import org.stagemonitor.configuration.converter.AbstractValueConverter; @@ -696,7 +702,8 @@ public String toSafeString(List value) { .key("central_config") .tags("added[1.8.0]") .configurationCategory(CORE_CATEGORY) - .description("When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration.") + .description("When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration.\n" + + "The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined.") .dynamic(true) .buildWithDefault(true); diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/AbstractIntakeApiHandler.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/AbstractIntakeApiHandler.java index 5fea031483..f10f8dc0d4 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/AbstractIntakeApiHandler.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/AbstractIntakeApiHandler.java @@ -22,6 +22,7 @@ import co.elastic.apm.agent.report.serialize.SerializationConstants; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import co.elastic.apm.agent.util.UrlConnectionUtils; import org.stagemonitor.util.IOUtils; import javax.annotation.Nullable; @@ -93,63 +94,64 @@ protected boolean shouldEndRequest() { protected HttpURLConnection startRequest(String endpoint) throws Exception { payloadSerializer.blockUntilReady(); final HttpURLConnection connection = apmServerClient.startRequest(endpoint); - if (connection != null) { + if (connection == null) { + return null; + } + try (UrlConnectionUtils.ContextClassloaderScope clScope = UrlConnectionUtils.withContextClassloaderOf(connection)){ + if (logger.isDebugEnabled()) { + logger.debug("Starting new request to {}", connection.getURL()); + } boolean useCompression = !isLocalhost(connection); + connection.setRequestMethod("POST"); + connection.setDoOutput(true); + connection.setChunkedStreamingMode(SerializationConstants.BUFFER_SIZE); + if (useCompression) { + connection.setRequestProperty("Content-Encoding", "deflate"); + } + connection.setRequestProperty("Content-Type", "application/x-ndjson"); + connection.setUseCaches(false); + connection.connect(); + countingOs = new CountingOutputStream(connection.getOutputStream()); // TODO : here + if (useCompression) { + os = new DeflaterOutputStream(countingOs, deflater, true); + } else { + os = countingOs; + } + payloadSerializer.setOutputStream(os); + payloadSerializer.appendMetaDataNdJsonToStream(); + payloadSerializer.flushToOutputStream(); + requestStartedNanos = System.nanoTime(); + } catch (IOException e) { try { - if (logger.isDebugEnabled()) { - logger.debug("Starting new request to {}", connection.getURL()); - } - connection.setRequestMethod("POST"); - connection.setDoOutput(true); - connection.setChunkedStreamingMode(SerializationConstants.BUFFER_SIZE); - if (useCompression) { - connection.setRequestProperty("Content-Encoding", "deflate"); - } - connection.setRequestProperty("Content-Type", "application/x-ndjson"); - connection.setUseCaches(false); - connection.connect(); - countingOs = new CountingOutputStream(connection.getOutputStream()); - if (useCompression) { - os = new DeflaterOutputStream(countingOs, deflater, true); - } else { - os = countingOs; - } - payloadSerializer.setOutputStream(os); - payloadSerializer.appendMetaDataNdJsonToStream(); - payloadSerializer.flushToOutputStream(); - requestStartedNanos = System.nanoTime(); - } catch (IOException e) { - try { - logger.error("Error trying to connect to APM Server at {}. Although not necessarily related to SSL, some related SSL " + - "configurations corresponding the current connection are logged at INFO level.", connection.getURL()); - if (logger.isInfoEnabled() && connection instanceof HttpsURLConnection) { - HttpsURLConnection httpsURLConnection = (HttpsURLConnection) connection; - try { - logger.info("Cipher suite used for this connection: {}", httpsURLConnection.getCipherSuite()); - } catch (Exception e1) { - SSLSocketFactory sslSocketFactory = httpsURLConnection.getSSLSocketFactory(); - logger.info("Default cipher suites: {}", Arrays.toString(sslSocketFactory.getDefaultCipherSuites())); - logger.info("Supported cipher suites: {}", Arrays.toString(sslSocketFactory.getSupportedCipherSuites())); - } - try { - logger.info("APM Server certificates: {}", Arrays.toString(httpsURLConnection.getServerCertificates())); - } catch (Exception e1) { - // ignore - invalid - } - try { - logger.info("Local certificates: {}", Arrays.toString(httpsURLConnection.getLocalCertificates())); - } catch (Exception e1) { - // ignore - invalid - } + logger.error("Error trying to connect to APM Server at {}. Although not necessarily related to SSL, some related SSL " + + "configurations corresponding the current connection are logged at INFO level.", connection.getURL()); + if (logger.isInfoEnabled() && connection instanceof HttpsURLConnection) { + HttpsURLConnection httpsURLConnection = (HttpsURLConnection) connection; + try { + logger.info("Cipher suite used for this connection: {}", httpsURLConnection.getCipherSuite()); + } catch (Exception e1) { + SSLSocketFactory sslSocketFactory = httpsURLConnection.getSSLSocketFactory(); + logger.info("Default cipher suites: {}", Arrays.toString(sslSocketFactory.getDefaultCipherSuites())); + logger.info("Supported cipher suites: {}", Arrays.toString(sslSocketFactory.getSupportedCipherSuites())); + } + try { + logger.info("APM Server certificates: {}", Arrays.toString(httpsURLConnection.getServerCertificates())); + } catch (Exception e1) { + // ignore - invalid + } + try { + logger.info("Local certificates: {}", Arrays.toString(httpsURLConnection.getLocalCertificates())); + } catch (Exception e1) { + // ignore - invalid } - } finally { - closeAndSuppressErrors(connection); } - throw e; - } catch (Throwable t) { + } finally { closeAndSuppressErrors(connection); - throw t; } + throw e; + } catch (Throwable t) { + closeAndSuppressErrors(connection); + throw t; } return connection; } @@ -188,7 +190,10 @@ protected void endRequestExceptionally() { } private void endRequest(boolean isFailed) { - if (connection != null) { + if (connection == null) { + return; + } + try (UrlConnectionUtils.ContextClassloaderScope clScope = UrlConnectionUtils.withContextClassloaderOf(connection)) { long writtenBytes = countingOs != null ? countingOs.getCount() : 0L; try { payloadSerializer.fullFlush(); diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java index 9c9d198c0c..c2e8234fc5 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/ApmServerClient.java @@ -265,8 +265,10 @@ public V execute(String path, ConnectionHandler connectionHandler) throws Exception previousException = null; for (URL serverUrl : prioritizedUrlList) { HttpURLConnection connection = null; + UrlConnectionUtils.ContextClassloaderScope clScope = null; try { connection = startRequestToUrl(appendPath(serverUrl, path)); + clScope = UrlConnectionUtils.withContextClassloaderOf(connection); return connectionHandler.withConnection(connection); } catch (Exception e) { expectedErrorCount = incrementAndGetErrorCount(expectedErrorCount); @@ -277,6 +279,9 @@ public V execute(String path, ConnectionHandler connectionHandler) throws previousException = e; } finally { HttpUtils.consumeAndClose(connection); + if (clScope != null) { + clScope.close(); + } } } if (previousException == null) { @@ -290,13 +295,19 @@ public List executeForAllUrls(String path, ConnectionHandler connectio List results = new ArrayList<>(serverUrls.size()); for (URL serverUrl : serverUrls) { HttpURLConnection connection = null; + UrlConnectionUtils.ContextClassloaderScope clScope = null; try { connection = startRequestToUrl(appendPath(serverUrl, path)); + clScope = UrlConnectionUtils.withContextClassloaderOf(connection); results.add(connectionHandler.withConnection(connection)); } catch (Exception e) { logger.debug("Exception while interacting with APM Server", e); } finally { HttpUtils.consumeAndClose(connection); + if (clScope != null) { + clScope.close(); + } + } } return results; @@ -436,6 +447,7 @@ private static String getUserAgent(CoreConfigurationImpl coreConfiguration) { /** * Escapes the provided string from characters that are disallowed within HTTP header comments. * See spec- https://httpwg.org/specs/rfc7230.html#field.components + * * @param headerFieldComment HTTP header comment value to be escaped * @return the escaped header comment */ diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/PartialTransactionReporter.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/PartialTransactionReporter.java index e88e5d603b..fa2635b50c 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/PartialTransactionReporter.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/PartialTransactionReporter.java @@ -26,6 +26,7 @@ import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; import co.elastic.apm.agent.tracer.pooling.Allocator; +import co.elastic.apm.agent.util.UrlConnectionUtils; import java.net.HttpURLConnection; @@ -67,27 +68,30 @@ public void reportPartialTransaction(TransactionImpl transaction) { logger.debug("Cannot report partial transaction because server url is not configured"); return; } - connection.setRequestMethod("POST"); - connection.setDoOutput(true); - connection.setChunkedStreamingMode(SerializationConstants.BUFFER_SIZE); - connection.setRequestProperty("Content-Type", "application/vnd.elastic.apm.transaction+ndjson"); - connection.setRequestProperty("x-elastic-aws-request-id", requestId); - connection.setUseCaches(false); - connection.connect(); - DslJsonSerializer.Writer writer = writerPool.createInstance(); - try { - writer.setOutputStream(connection.getOutputStream()); - writer.blockUntilReady(); //should actually not block on AWS Lambda, as metadata is available immediately - writer.appendMetaDataNdJsonToStream(); - writer.serializeTransactionNdJson(transaction); - writer.fullFlush(); - } finally { - writerPool.recycle(writer); - } + try (UrlConnectionUtils.ContextClassloaderScope clScope = UrlConnectionUtils.withContextClassloaderOf(connection)) { + connection.setRequestMethod("POST"); + connection.setDoOutput(true); + connection.setChunkedStreamingMode(SerializationConstants.BUFFER_SIZE); + connection.setRequestProperty("Content-Type", "application/vnd.elastic.apm.transaction+ndjson"); + connection.setRequestProperty("x-elastic-aws-request-id", requestId); + connection.setUseCaches(false); + connection.connect(); + + DslJsonSerializer.Writer writer = writerPool.createInstance(); + try { + writer.setOutputStream(connection.getOutputStream()); + writer.blockUntilReady(); //should actually not block on AWS Lambda, as metadata is available immediately + writer.appendMetaDataNdJsonToStream(); + writer.serializeTransactionNdJson(transaction); + writer.fullFlush(); + } finally { + writerPool.recycle(writer); + } - handleResponse(connection); - connection.disconnect(); + handleResponse(connection); + connection.disconnect(); + } } catch (Exception e) { logger.error("Failed to report partial transaction {}", transaction, e); diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/util/UrlConnectionUtils.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/util/UrlConnectionUtils.java index 631e1f18d1..67f6195b5d 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/util/UrlConnectionUtils.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/util/UrlConnectionUtils.java @@ -23,7 +23,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; import java.io.IOException; +import java.net.HttpURLConnection; import java.net.Proxy; import java.net.ProxySelector; import java.net.URISyntaxException; @@ -87,4 +89,48 @@ private static void debugPrintProxySettings(URL url, boolean allowProxy) { } } } + + public static ContextClassloaderScope withContextClassloaderOf(HttpURLConnection connection) { + Class type = connection.getClass(); + // so far, only weblogic is known to use context CL to load parts of the SSL/TLS communication + // see https://github.com/elastic/apm-agent-java/issues/2409 for background on why this is needed + boolean override = type.getCanonicalName().startsWith("weblogic."); + return withContextClassloader(type.getClassLoader(), override); + } + + // package private for testing + static ContextClassloaderScope withContextClassloader(@Nullable ClassLoader cl, boolean override) { + if (!override) { + return ContextClassloaderScope.NOOP; + } + return new ContextClassloaderScope(cl, false); + } + + public static class ContextClassloaderScope implements AutoCloseable { + + private static final ContextClassloaderScope NOOP = new ContextClassloaderScope(null, true); + + private final boolean noop; + @Nullable + private final ClassLoader previous; + + private ContextClassloaderScope(@Nullable ClassLoader classLoader, boolean noop) { + this.noop = noop; + if (noop) { + this.previous = null; + return; + } + this.previous = Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader(classLoader); + } + + @Override + public void close() { + if (noop) { + return; + } + Thread.currentThread().setContextClassLoader(previous); + + } + } } diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/util/UrlConnectionUtilsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/UrlConnectionUtilsTest.java new file mode 100644 index 0000000000..3231165124 --- /dev/null +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/UrlConnectionUtilsTest.java @@ -0,0 +1,80 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.util; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import javax.annotation.Nullable; + +import static org.assertj.core.api.Assertions.assertThat; + +class UrlConnectionUtilsTest { + + @BeforeEach + void beforeEach() { + Thread.currentThread().setContextClassLoader(null); + } + + @AfterEach + void afterEach() { + Thread.currentThread().setContextClassLoader(null); + } + + @Test + void threadContextClassLoader_noop() { + ClassLoader cl = UrlConnectionUtils.class.getClassLoader(); + testContextClassLoader(null, null, false); + testContextClassLoader(cl, cl, false); + } + + @Test + void threadContextClassLoader_override() { + ClassLoader cl = UrlConnectionUtils.class.getClassLoader(); + testContextClassLoader(null, cl, true); + testContextClassLoader(cl, cl, true); + + DummyClassLoader overrideCl = new DummyClassLoader(); + testContextClassLoader(null, overrideCl, true); + testContextClassLoader(cl, overrideCl, true); + } + + private void testContextClassLoader(@Nullable ClassLoader initialClassLoader, @Nullable ClassLoader scopeClassLoader, boolean override) { + Thread.currentThread().setContextClassLoader(initialClassLoader); + checkContextClassLoader(initialClassLoader); + try (UrlConnectionUtils.ContextClassloaderScope scope = UrlConnectionUtils.withContextClassloader(scopeClassLoader, override)) { + checkContextClassLoader(scopeClassLoader); + } + checkContextClassLoader(initialClassLoader); + } + + private void checkContextClassLoader(@Nullable ClassLoader expected) { + ClassLoader threadContextCl = Thread.currentThread().getContextClassLoader(); + if (expected == null) { + assertThat(threadContextCl).isNull(); + } else { + assertThat(threadContextCl).isSameAs(expected); + } + } + + private static class DummyClassLoader extends ClassLoader { + + } +} diff --git a/apm-agent-core/src/test/resources/apm-server-schema/current/span.json b/apm-agent-core/src/test/resources/apm-server-schema/current/span.json index e86da9a69c..14eea1b15b 100644 --- a/apm-agent-core/src/test/resources/apm-server-schema/current/span.json +++ b/apm-agent-core/src/test/resources/apm-server-schema/current/span.json @@ -188,6 +188,9 @@ "object" ], "properties": { + "body": { + "description": "The http request body usually as a string, but may be a dictionary for multipart/form-data content" + }, "id": { "description": "ID holds the unique identifier for the http request.", "type": [ diff --git a/apm-agent-lambda-layer/pom.xml b/apm-agent-lambda-layer/pom.xml index 55ee59d512..33dfc90b4c 100644 --- a/apm-agent-lambda-layer/pom.xml +++ b/apm-agent-lambda-layer/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugin-sdk/pom.xml b/apm-agent-plugin-sdk/pom.xml index 045f7ac524..e7837746ec 100644 --- a/apm-agent-plugin-sdk/pom.xml +++ b/apm-agent-plugin-sdk/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/state/CallDepth.java b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/state/CallDepth.java index 72e8129253..3dcf1e8545 100644 --- a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/state/CallDepth.java +++ b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/state/CallDepth.java @@ -43,6 +43,10 @@ private CallDepth() { public static CallDepth get(Class adviceClass) { // we want to return the same CallDepth instance even if the advice class has been loaded from different class loaders String key = adviceClass.getName(); + return get(key); + } + + public static CallDepth get(String key) { CallDepth callDepth = registry.get(key); if (callDepth == null) { registry.putIfAbsent(key, new CallDepth()); diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient-common/pom.xml b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient-common/pom.xml index 3853492a9b..d4bb0bb595 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient-common/pom.xml +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient-common/pom.xml @@ -5,7 +5,7 @@ apm-apache-httpclient co.elastic.apm - 1.52.1 + 1.52.2 apm-apache-httpclient-common diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/pom.xml b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/pom.xml index 76b9b67f16..10976f9797 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/pom.xml +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient3-plugin/pom.xml @@ -5,7 +5,7 @@ apm-apache-httpclient co.elastic.apm - 1.52.1 + 1.52.2 apm-apache-httpclient3-plugin diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/pom.xml b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/pom.xml index b10abd58ee..3b2b74ef20 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/pom.xml +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient4-plugin/pom.xml @@ -5,7 +5,7 @@ apm-apache-httpclient co.elastic.apm - 1.52.1 + 1.52.2 apm-apache-httpclient4-plugin diff --git a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient5-plugin/pom.xml b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient5-plugin/pom.xml index b9ab1e146e..c1aede353e 100644 --- a/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient5-plugin/pom.xml +++ b/apm-agent-plugins/apm-apache-httpclient/apm-apache-httpclient5-plugin/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-apache-httpclient - 1.52.1 + 1.52.2 apm-apache-httpclient5-plugin diff --git a/apm-agent-plugins/apm-apache-httpclient/pom.xml b/apm-agent-plugins/apm-apache-httpclient/pom.xml index d3e32a5e79..c906cee39e 100644 --- a/apm-agent-plugins/apm-apache-httpclient/pom.xml +++ b/apm-agent-plugins/apm-apache-httpclient/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-apache-httpclient diff --git a/apm-agent-plugins/apm-api-plugin/pom.xml b/apm-agent-plugins/apm-api-plugin/pom.xml index 09a9c8ed5e..df765970af 100644 --- a/apm-agent-plugins/apm-api-plugin/pom.xml +++ b/apm-agent-plugins/apm-api-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 diff --git a/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml b/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml index fd76050c8c..8f9bf98598 100644 --- a/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-asynchttpclient-plugin diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml index 0c39457e87..ecb3b048e8 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml @@ -3,7 +3,7 @@ apm-aws-sdk co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 @@ -12,7 +12,7 @@ ${project.basedir}/../../.. - 1.12.777 + 1.12.780 1.1.0 diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml index 555d6a6ca8..fd420af11d 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml @@ -3,7 +3,7 @@ apm-aws-sdk co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 @@ -13,7 +13,7 @@ ${project.basedir}/../../.. - 2.29.5 + 2.30.11 2.0.0 8 diff --git a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml index 75023fa432..775af3d4f3 100644 --- a/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml +++ b/apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml @@ -3,7 +3,7 @@ apm-aws-sdk co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-aws-sdk/pom.xml b/apm-agent-plugins/apm-aws-sdk/pom.xml index 72acf73571..80c8515790 100644 --- a/apm-agent-plugins/apm-aws-sdk/pom.xml +++ b/apm-agent-plugins/apm-aws-sdk/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-awslambda-plugin/pom.xml b/apm-agent-plugins/apm-awslambda-plugin/pom.xml index ced51a9084..6ebcc4a89f 100644 --- a/apm-agent-plugins/apm-awslambda-plugin/pom.xml +++ b/apm-agent-plugins/apm-awslambda-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-cassandra/apm-cassandra-core-plugin/pom.xml b/apm-agent-plugins/apm-cassandra/apm-cassandra-core-plugin/pom.xml index 90c02e8d40..503d60fa16 100644 --- a/apm-agent-plugins/apm-cassandra/apm-cassandra-core-plugin/pom.xml +++ b/apm-agent-plugins/apm-cassandra/apm-cassandra-core-plugin/pom.xml @@ -3,7 +3,7 @@ apm-cassandra co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml b/apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml index c8a7ae48b5..d6638eb6a7 100644 --- a/apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml +++ b/apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml @@ -3,7 +3,7 @@ apm-cassandra co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml b/apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml index a12d618cba..4f19d37de1 100644 --- a/apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml +++ b/apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml @@ -3,7 +3,7 @@ apm-cassandra co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-cassandra/pom.xml b/apm-agent-plugins/apm-cassandra/pom.xml index d3b36870b6..dcbd89afa1 100644 --- a/apm-agent-plugins/apm-cassandra/pom.xml +++ b/apm-agent-plugins/apm-cassandra/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-dubbo-plugin/pom.xml b/apm-agent-plugins/apm-dubbo-plugin/pom.xml index bc644c120e..eae7bb2768 100644 --- a/apm-agent-plugins/apm-dubbo-plugin/pom.xml +++ b/apm-agent-plugins/apm-dubbo-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml b/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml index ef580031dc..ddbd00420d 100644 --- a/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml +++ b/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-ecs-logging-plugin diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/pom.xml index 41ddef4f5f..c6beb72b21 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-5_6/pom.xml @@ -5,7 +5,7 @@ apm-es-restclient-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-es-restclient-plugin-5_6 diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-6_4/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-6_4/pom.xml index 720de42369..c41a4c69a7 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-6_4/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-6_4/pom.xml @@ -5,7 +5,7 @@ apm-es-restclient-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-es-restclient-plugin-6_4 diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/pom.xml index c66ad7d3bc..79cb241352 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-7_x/pom.xml @@ -5,7 +5,7 @@ apm-es-restclient-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-es-restclient-plugin-7_x diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml index 2e4df505ba..1870f7c54d 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-8_x/pom.xml @@ -3,7 +3,7 @@ apm-es-restclient-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/pom.xml index 268f5629ee..f66f70ae3a 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/apm-es-restclient-plugin-common/pom.xml @@ -5,7 +5,7 @@ apm-es-restclient-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-es-restclient-plugin-common diff --git a/apm-agent-plugins/apm-es-restclient-plugin/pom.xml b/apm-agent-plugins/apm-es-restclient-plugin/pom.xml index 693cacf94a..ac3f3d94b5 100644 --- a/apm-agent-plugins/apm-es-restclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-es-restclient-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-es-restclient-plugin diff --git a/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml index cdd6dae9fe..07c48c4cd6 100644 --- a/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-finagle-httpclient-plugin diff --git a/apm-agent-plugins/apm-grails-plugin/pom.xml b/apm-agent-plugins/apm-grails-plugin/pom.xml index 48ad120bbd..c20410523f 100644 --- a/apm-agent-plugins/apm-grails-plugin/pom.xml +++ b/apm-agent-plugins/apm-grails-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-grails-plugin diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml index b6f7a8f2c5..9c1475bba5 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml +++ b/apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-grpc - 1.52.1 + 1.52.2 apm-grpc-plugin diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml b/apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml index 179731d5f1..3e81b65854 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml +++ b/apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-grpc - 1.52.1 + 1.52.2 apm-grpc-test-1.6.1 diff --git a/apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml b/apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml index ee1e5e7994..63416193b1 100644 --- a/apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml +++ b/apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-grpc - 1.52.1 + 1.52.2 apm-grpc-test-latest diff --git a/apm-agent-plugins/apm-grpc/pom.xml b/apm-agent-plugins/apm-grpc/pom.xml index c0066dbc34..75f30bdd05 100644 --- a/apm-agent-plugins/apm-grpc/pom.xml +++ b/apm-agent-plugins/apm-grpc/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-plugins - 1.52.1 + 1.52.2 apm-grpc diff --git a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-5_x/pom.xml b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-5_x/pom.xml index 34da9121ca..3c0ff4dea2 100644 --- a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-5_x/pom.xml +++ b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-5_x/pom.xml @@ -5,7 +5,7 @@ apm-hibernate-search-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-hibernate-search-plugin-5_x diff --git a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-6_x/pom.xml b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-6_x/pom.xml index efb723ebb6..12cfc370cf 100644 --- a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-6_x/pom.xml +++ b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-6_x/pom.xml @@ -5,7 +5,7 @@ apm-hibernate-search-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-hibernate-search-plugin-6_x diff --git a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-common/pom.xml b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-common/pom.xml index e4f74d10bc..25980652d0 100644 --- a/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-common/pom.xml +++ b/apm-agent-plugins/apm-hibernate-search-plugin/apm-hibernate-search-plugin-common/pom.xml @@ -5,7 +5,7 @@ apm-hibernate-search-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-hibernate-search-plugin-common diff --git a/apm-agent-plugins/apm-hibernate-search-plugin/pom.xml b/apm-agent-plugins/apm-hibernate-search-plugin/pom.xml index 47b5f6a7fd..860b97a147 100644 --- a/apm-agent-plugins/apm-hibernate-search-plugin/pom.xml +++ b/apm-agent-plugins/apm-hibernate-search-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-hibernate-search-plugin diff --git a/apm-agent-plugins/apm-httpclient-core/pom.xml b/apm-agent-plugins/apm-httpclient-core/pom.xml index 5ba68a62f9..e305accff7 100644 --- a/apm-agent-plugins/apm-httpclient-core/pom.xml +++ b/apm-agent-plugins/apm-httpclient-core/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-httpclient-core diff --git a/apm-agent-plugins/apm-httpserver-core/pom.xml b/apm-agent-plugins/apm-httpserver-core/pom.xml index e16a2a0863..915bc1f298 100644 --- a/apm-agent-plugins/apm-httpserver-core/pom.xml +++ b/apm-agent-plugins/apm-httpserver-core/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-httpserver-core diff --git a/apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml b/apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml index d9e74e658e..408536e91e 100644 --- a/apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml +++ b/apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jakarta-websocket-plugin diff --git a/apm-agent-plugins/apm-java-concurrent-plugin/pom.xml b/apm-agent-plugins/apm-java-concurrent-plugin/pom.xml index 2d24d0f067..9eb8fe209a 100644 --- a/apm-agent-plugins/apm-java-concurrent-plugin/pom.xml +++ b/apm-agent-plugins/apm-java-concurrent-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-java-concurrent-plugin diff --git a/apm-agent-plugins/apm-java-ldap-plugin/pom.xml b/apm-agent-plugins/apm-java-ldap-plugin/pom.xml index bc8f19d9aa..82431aa77a 100644 --- a/apm-agent-plugins/apm-java-ldap-plugin/pom.xml +++ b/apm-agent-plugins/apm-java-ldap-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-java-ldap-plugin diff --git a/apm-agent-plugins/apm-javalin-plugin/pom.xml b/apm-agent-plugins/apm-javalin-plugin/pom.xml index d772b0bdad..8df3f0414e 100644 --- a/apm-agent-plugins/apm-javalin-plugin/pom.xml +++ b/apm-agent-plugins/apm-javalin-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-javalin-plugin diff --git a/apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml b/apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml index 715c21ce2e..99fcd063b7 100644 --- a/apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml +++ b/apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-jaxrs-plugin/pom.xml b/apm-agent-plugins/apm-jaxrs-plugin/pom.xml index adff46548e..86ba47e57d 100644 --- a/apm-agent-plugins/apm-jaxrs-plugin/pom.xml +++ b/apm-agent-plugins/apm-jaxrs-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jaxrs-plugin diff --git a/apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml b/apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml index 6f4a46eb48..792f9363b2 100644 --- a/apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml +++ b/apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-jaxws-plugin/pom.xml b/apm-agent-plugins/apm-jaxws-plugin/pom.xml index 31c79ca4ab..20eb1a04fa 100644 --- a/apm-agent-plugins/apm-jaxws-plugin/pom.xml +++ b/apm-agent-plugins/apm-jaxws-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jaxws-plugin diff --git a/apm-agent-plugins/apm-jdbc-plugin/pom.xml b/apm-agent-plugins/apm-jdbc-plugin/pom.xml index 691295c26a..2c5ff865da 100644 --- a/apm-agent-plugins/apm-jdbc-plugin/pom.xml +++ b/apm-agent-plugins/apm-jdbc-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jdbc-plugin diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java index 8a924884cb..fde401ce43 100644 --- a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java +++ b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/AbstractJdbcInstrumentationTest.java @@ -20,13 +20,13 @@ import co.elastic.apm.agent.AbstractInstrumentationTest; import co.elastic.apm.agent.configuration.SpanConfiguration; -import co.elastic.apm.agent.impl.transaction.SpanImpl; -import co.elastic.apm.agent.sdk.internal.db.signature.SignatureParser; import co.elastic.apm.agent.impl.context.DbImpl; import co.elastic.apm.agent.impl.context.DestinationImpl; -import co.elastic.apm.agent.tracer.Outcome; +import co.elastic.apm.agent.impl.transaction.SpanImpl; import co.elastic.apm.agent.impl.transaction.TransactionImpl; import co.elastic.apm.agent.jdbc.helper.JdbcGlobalState; +import co.elastic.apm.agent.sdk.internal.db.signature.SignatureParser; +import co.elastic.apm.agent.tracer.Outcome; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -441,8 +441,12 @@ private SpanImpl assertSpanRecorded(String rawSql, boolean preparedStatement, lo DbImpl db = span.getContext().getDb(); assertThat(db).hasStatement(rawSql); DatabaseMetaData metaData = connection.getMetaData(); - - assertThat(db.getUser()).isEqualToIgnoringCase(metaData.getUserName()); + String expectedUserName = metaData.getUserName(); + if (expectedUserName == null || expectedUserName.isEmpty()) { + assertThat(db.getUser()).isNullOrEmpty(); + } else { + assertThat(db.getUser()).isEqualToIgnoringCase(expectedUserName); + } assertThat(db.getType()).isEqualToIgnoringCase("sql"); assertThat(db.getAffectedRowsCount()) diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/JdbcDbIT.java b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/JdbcDbIT.java index 5438b78250..cda3d5ff0b 100644 --- a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/JdbcDbIT.java +++ b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/JdbcDbIT.java @@ -43,7 +43,8 @@ public static Iterable data() { {"jdbc:tc:postgresql:9://hostname/databasename", "postgresql", "databasename", true}, {"jdbc:tc:postgresql:10://hostname/databasename", "postgresql", "databasename", true}, {"jdbc:tc:mariadb:10://hostname/databasename", "mariadb", "databasename", true}, - {"jdbc:tc:sqlserver:2017-CU12://hostname/databasename", "mssql", "master", false}, // for mssql the 'master' name comes from the runtime catalog fallback + // TODO: SQL Server image seems to be broken with recent kernel versions: https://github.com/microsoft/mssql-docker/issues/868 + //{"jdbc:tc:sqlserver:2017-CU12://hostname/databasename", "mssql", "master", false}, // for mssql the 'master' name comes from the runtime catalog fallback {"jdbc:tc:db2:11.5.0.0a://hostname/databasename", "db2", "test", true}, {"jdbc:tc:oracle://hostname/databasename", "oracle", "xepdb1", true}, }); diff --git a/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml index 300de8e09e..942dd4855a 100644 --- a/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jdk-httpclient-plugin diff --git a/apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml b/apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml index ff780c75cb..2d55cb13e3 100644 --- a/apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml +++ b/apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jdk-httpserver-plugin diff --git a/apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml b/apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml index 3ceaeeed57..6c369676eb 100644 --- a/apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml +++ b/apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml @@ -3,7 +3,7 @@ apm-jms-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml b/apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml index ec73ca11d7..ee96453752 100644 --- a/apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml +++ b/apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml @@ -3,7 +3,7 @@ apm-jms-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml b/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml index 93fd098cbb..5bdeb42735 100644 --- a/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml +++ b/apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml @@ -5,7 +5,7 @@ apm-jms-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jms-plugin-base diff --git a/apm-agent-plugins/apm-jms-plugin/apm-jms-spring-plugin/pom.xml b/apm-agent-plugins/apm-jms-plugin/apm-jms-spring-plugin/pom.xml index 9fed527d45..625d232ec5 100644 --- a/apm-agent-plugins/apm-jms-plugin/apm-jms-spring-plugin/pom.xml +++ b/apm-agent-plugins/apm-jms-plugin/apm-jms-spring-plugin/pom.xml @@ -5,7 +5,7 @@ apm-jms-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jms-spring-plugin diff --git a/apm-agent-plugins/apm-jms-plugin/pom.xml b/apm-agent-plugins/apm-jms-plugin/pom.xml index 53d29614fd..afa6a93452 100644 --- a/apm-agent-plugins/apm-jms-plugin/pom.xml +++ b/apm-agent-plugins/apm-jms-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jms-plugin diff --git a/apm-agent-plugins/apm-jmx-plugin/pom.xml b/apm-agent-plugins/apm-jmx-plugin/pom.xml index 430de476e8..efa9aacb68 100644 --- a/apm-agent-plugins/apm-jmx-plugin/pom.xml +++ b/apm-agent-plugins/apm-jmx-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jmx-plugin diff --git a/apm-agent-plugins/apm-jsf-plugin/pom.xml b/apm-agent-plugins/apm-jsf-plugin/pom.xml index e8361a49c7..821dc217db 100644 --- a/apm-agent-plugins/apm-jsf-plugin/pom.xml +++ b/apm-agent-plugins/apm-jsf-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-jsf-plugin diff --git a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-base-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-base-plugin/pom.xml index 7a7257873d..6c08d51c37 100644 --- a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-base-plugin/pom.xml +++ b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-base-plugin/pom.xml @@ -3,7 +3,7 @@ apm-kafka-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml index 5cd0d30e01..d27d5cf919 100644 --- a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml +++ b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml @@ -4,7 +4,7 @@ apm-kafka-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml index bc3ddaeaa0..960cef01c6 100644 --- a/apm-agent-plugins/apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml +++ b/apm-agent-plugins/apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml @@ -4,7 +4,7 @@ apm-kafka-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-kafka-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/pom.xml index 3e0efa25cf..7812dd1fcb 100644 --- a/apm-agent-plugins/apm-kafka-plugin/pom.xml +++ b/apm-agent-plugins/apm-kafka-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-logging-plugin/apm-jboss-logging-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-jboss-logging-plugin/pom.xml index bf6f343678..9415f0d383 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-jboss-logging-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-jboss-logging-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jboss-logging-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml index f6cf2891e5..4a9cd5b469 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jul-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/apm-log4j1-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-log4j1-plugin/pom.xml index 6aa03fcb2b..33b2c26623 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-log4j1-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-log4j1-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-log4j1-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin-tests/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin-tests/pom.xml index 959e18b85b..554a15b8a2 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin-tests/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin-tests/pom.xml @@ -6,7 +6,7 @@ co.elastic.apm apm-logging-plugin - 1.52.1 + 1.52.2 apm-log4j2-plugin-tests diff --git a/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml index 60f116fd2c..358c641064 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-log4j2-plugin @@ -24,7 +24,7 @@ org.apache.logging.log4j log4j-core - 2.24.1 + 2.24.3 provided diff --git a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-impl/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-impl/pom.xml index 90f8cff24f..c679f837aa 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-impl/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-impl/pom.xml @@ -5,7 +5,7 @@ apm-logback-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-logback-plugin-impl diff --git a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-legacy-tests/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-legacy-tests/pom.xml index e1776b4ab8..0a46570560 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-legacy-tests/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/apm-logback-plugin-legacy-tests/pom.xml @@ -5,7 +5,7 @@ apm-logback-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-logback-plugin-legacy-tests diff --git a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/pom.xml index 060d0805d4..b4619758d4 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-logback-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/apm-logging-plugin-common/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-logging-plugin-common/pom.xml index 8779ded961..cfb0332e53 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-logging-plugin-common/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-logging-plugin-common/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-logging-plugin-common diff --git a/apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml index 38a1c92dfc..5296c632ff 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-slf4j-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml index 9346f8a241..ca6959a020 100644 --- a/apm-agent-plugins/apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml @@ -5,7 +5,7 @@ apm-logging-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-tomcat-logging-plugin diff --git a/apm-agent-plugins/apm-logging-plugin/pom.xml b/apm-agent-plugins/apm-logging-plugin/pom.xml index 82e97a86f0..e84b10dc7a 100644 --- a/apm-agent-plugins/apm-logging-plugin/pom.xml +++ b/apm-agent-plugins/apm-logging-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-logging-plugin diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml index df9047d23b..5b5d1f1170 100644 --- a/apm-agent-plugins/apm-micrometer-plugin/pom.xml +++ b/apm-agent-plugins/apm-micrometer-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 @@ -23,7 +23,7 @@ io.micrometer micrometer-core - 1.13.6 + 1.14.4 provided diff --git a/apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml b/apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml index f412954c9b..b6d9457f31 100644 --- a/apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml +++ b/apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml @@ -4,7 +4,7 @@ apm-mongodb co.elastic.apm - 1.52.1 + 1.52.2 diff --git a/apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml b/apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml index 681faf1010..e19d652fb5 100644 --- a/apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml +++ b/apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml @@ -3,7 +3,7 @@ apm-mongodb co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml b/apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml index 9d0b5f3acd..289590c574 100644 --- a/apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml +++ b/apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml @@ -5,7 +5,7 @@ apm-mongodb co.elastic.apm - 1.52.1 + 1.52.2 apm-mongodb4-plugin diff --git a/apm-agent-plugins/apm-mongodb/pom.xml b/apm-agent-plugins/apm-mongodb/pom.xml index 7f51673171..a0d416d4de 100644 --- a/apm-agent-plugins/apm-mongodb/pom.xml +++ b/apm-agent-plugins/apm-mongodb/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-mongodb diff --git a/apm-agent-plugins/apm-okhttp-plugin/pom.xml b/apm-agent-plugins/apm-okhttp-plugin/pom.xml index 5af862520c..1523eafa20 100644 --- a/apm-agent-plugins/apm-okhttp-plugin/pom.xml +++ b/apm-agent-plugins/apm-okhttp-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-okhttp-plugin diff --git a/apm-agent-plugins/apm-okhttp-test/pom.xml b/apm-agent-plugins/apm-okhttp-test/pom.xml index e671cd75e0..2e52dbb7fe 100644 --- a/apm-agent-plugins/apm-okhttp-test/pom.xml +++ b/apm-agent-plugins/apm-okhttp-test/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/pom.xml index 66201313a6..2c13c57dc5 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-opentelemetry - 1.52.1 + 1.52.2 apm-opentelemetry-embedded-metrics-sdk diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManager.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManager.java index 95c57c60c3..3533bb4761 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManager.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManager.java @@ -18,11 +18,12 @@ */ package co.elastic.apm.agent.embeddedotel; -import co.elastic.apm.agent.tracer.AbstractLifecycleListener; import co.elastic.apm.agent.embeddedotel.proxy.ProxyMeterProvider; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import co.elastic.apm.agent.tracer.AbstractLifecycleListener; import co.elastic.apm.agent.tracer.Tracer; +import io.opentelemetry.api.metrics.MeterProvider; import io.opentelemetry.sdk.metrics.SdkMeterProvider; import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; @@ -65,6 +66,10 @@ public ProxyMeterProvider getMeterProvider() { if (sdkInstance == null) { startSdk(); } + if (sdkInstance == null) { + logger.warn("Returning NoOp-MeterProvider because OpenTelemetry metrics SDK could not be initialized!"); + return new ProxyMeterProvider(MeterProvider.noop()); + } return new ProxyMeterProvider(sdkInstance); } @@ -78,7 +83,11 @@ synchronized void reset() { } private synchronized void startSdk() { - if (isShutdown || sdkInstance != null || tracer == null) { + if (isShutdown || sdkInstance != null) { + return; + } + if (tracer == null) { + logger.warn("Cannot initialize OpenTelemetry metrics SDK because tracer has not started yet"); return; } logger.debug("Starting embedded OpenTelemetry metrics SDK"); diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/test/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManagerTest.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/test/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManagerTest.java new file mode 100644 index 0000000000..13e828559d --- /dev/null +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/test/java/co/elastic/apm/agent/embeddedotel/EmbeddedSdkManagerTest.java @@ -0,0 +1,40 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.embeddedotel; + +import co.elastic.apm.agent.embeddedotel.proxy.ProxyMeter; +import co.elastic.apm.agent.tracer.Tracer; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class EmbeddedSdkManagerTest { + + /** + * The instrumentation of the agent is performed before {@link EmbeddedSdkManager#init(Tracer)} is invoked. + * This means if the agent is started asynchronously, it can happen that {@link EmbeddedSdkManager#getMeterProvider()} + * is invoked before the tracer has been provided. + * This test verifies that in that case no exception occurs and a noop-meter implementation is used. + */ + @Test + public void ensureNoExceptionOnMissingTracer() throws Exception { + ProxyMeter meter = new EmbeddedSdkManager().getMeterProvider().get("foobar"); + assertThat(meter.getDelegate()).isInstanceOf(Class.forName("io.opentelemetry.api.metrics.DefaultMeter")); + } +} diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-common/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-common/pom.xml index ea02d2f192..046798db3f 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-common/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-common/pom.xml @@ -3,7 +3,7 @@ apm-opentelemetry-metrics-bridge-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-latest/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-latest/pom.xml index b5a9587ddb..5d43104eef 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-latest/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-latest/pom.xml @@ -3,7 +3,7 @@ apm-opentelemetry-metrics-bridge-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-v1_14/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-v1_14/pom.xml index 81363b1083..4ec62bbbcb 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-v1_14/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/apm-opentelemetry-metrics-bridge-v1_14/pom.xml @@ -3,7 +3,7 @@ apm-opentelemetry-metrics-bridge-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/pom.xml index 54a7691ebb..dc86e69533 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metrics-bridge-parent/pom.xml @@ -3,7 +3,7 @@ apm-opentelemetry co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/pom.xml index fa2e5af2e6..c5d37afaea 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-opentelemetry - 1.52.1 + 1.52.2 apm-opentelemetry-metricsdk-plugin diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/pom.xml index 40c69c2a1f..2b1934ea9d 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-opentelemetry - 1.52.1 + 1.52.2 apm-opentelemetry-plugin @@ -29,13 +29,6 @@ provided - - io.opentelemetry.semconv - opentelemetry-semconv - ${version.opentelemetry-semconv} - test - - ${project.groupId} apm-opentelemetry-embedded-metrics-sdk diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/SemAttributes.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/SemAttributes.java index 7077c599ec..a06ecc1d0c 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/SemAttributes.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/co/elastic/apm/agent/opentelemetry/SemAttributes.java @@ -21,29 +21,14 @@ import io.opentelemetry.api.common.AttributeKey; /** - * Bridge for integration tests which use {@link io.opentelemetry.semconv.SemanticAttributes} + * Bridge for integration tests which use semconv attributes * which has been moved from {@code io.opentelemetry.semconv.trace.attributes.SemanticAttributes}. */ public class SemAttributes { - public static final AttributeKey HTTP_URL = getAttribute("HTTP_URL"); - public static final AttributeKey HTTP_STATUS_CODE = getAttribute("HTTP_STATUS_CODE"); - public static final AttributeKey HTTP_METHOD = getAttribute("HTTP_METHOD"); - public static final AttributeKey NET_PEER_PORT = getAttribute("NET_PEER_PORT"); - public static final AttributeKey NET_PEER_IP = getAttribute("NET_PEER_IP"); - - @SuppressWarnings("unchecked") - private static AttributeKey getAttribute(String name) { - try { - Class attribClass; - try { - attribClass = Class.forName("io.opentelemetry.semconv.SemanticAttributes"); - } catch (ClassNotFoundException cnf) { - attribClass = Class.forName("io.opentelemetry.semconv.trace.attributes.SemanticAttributes"); - } - return (AttributeKey) attribClass.getField(name).get(null); - }catch (Exception e) { - throw new IllegalStateException(e); - } - } + public static final AttributeKey HTTP_URL = AttributeKey.stringKey("HTTP_URL"); + public static final AttributeKey HTTP_STATUS_CODE = AttributeKey.longKey("HTTP_STATUS_CODE"); + public static final AttributeKey HTTP_METHOD = AttributeKey.stringKey("HTTP_METHOD"); + public static final AttributeKey NET_PEER_PORT = AttributeKey.longKey("NET_PEER_PORT"); + public static final AttributeKey NET_PEER_IP = AttributeKey.stringKey("NET_PEER_IP"); } diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/specs/OTelBridgeStepsDefinitions.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/specs/OTelBridgeStepsDefinitions.java index dea9a4cb24..40ae523a3e 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/specs/OTelBridgeStepsDefinitions.java +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/test/java/specs/OTelBridgeStepsDefinitions.java @@ -20,7 +20,6 @@ import co.elastic.apm.agent.impl.context.ServiceTargetImpl; import co.elastic.apm.agent.impl.transaction.*; -import co.elastic.apm.agent.impl.transaction.TransactionImpl; import co.elastic.apm.agent.opentelemetry.global.ElasticOpenTelemetry; import co.elastic.apm.agent.opentelemetry.tracing.ElasticOpenTelemetryTest; import co.elastic.apm.agent.opentelemetry.tracing.OTelSpan; @@ -34,7 +33,6 @@ import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.api.trace.StatusCode; import io.opentelemetry.context.Context; -import io.opentelemetry.semconv.SemanticAttributes; import javax.annotation.Nullable; import java.util.HashMap; @@ -103,7 +101,7 @@ public void bridgedTransactionWithRemoteContextParent() { assertThat(traceContext.getTraceId().toString()).isEqualTo(REMOTE_PARENT_TRACE_ID); } - private Context getRemoteContext(){ + private Context getRemoteContext() { return getOtel().getPropagators() .getTextMapPropagator() .extract(Context.current(), @@ -113,7 +111,7 @@ private Context getRemoteContext(){ } @Given("OTel span is created without parent") - public void createOTelSpanWithoutParent(){ + public void createOTelSpanWithoutParent() { otelSpan = (OTelSpan) getOtel().getTracer("") .spanBuilder("otel span") .setNoParent() // redundant, but makes it explicit @@ -156,14 +154,14 @@ public void otelSpanIsCreatedWithKind(String kind) { // the parent transaction is created by another step definition, thus we reuse the existing state TransactionImpl parentTransaction = state.getTransaction(); - Function createSpanWithKind = k -> { + Function createSpanWithKind = k -> { SpanBuilder spanBuilder = getOtel().getTracer("") .spanBuilder("span") .setSpanKind(SpanKind.valueOf(k)); return (OTelSpan) spanBuilder.startSpan(); }; - if( parentTransaction != null){ + if (parentTransaction != null) { // creating a span as a child of existing transaction try (Scope scope = parentTransaction.activateInScope()) { this.otelSpan = createSpanWithKind.apply(kind); @@ -205,40 +203,19 @@ public void otelSpanAttributes(io.cucumber.datatable.DataTable table) { } private static AttributeKey lookupKey(String name) { + // only doing a simple type mapping to cover existing test cases + // this is not meant to be exhaustive nor to cover up-to-date semconv definitions switch (name) { - case "http.url": - return SemanticAttributes.HTTP_URL; - case "http.scheme": - return SemanticAttributes.HTTP_SCHEME; - case "http.host": - return SemanticAttributes.HTTP_HOST; - case "net.peer.name": - return SemanticAttributes.NET_PEER_NAME; - case "net.peer.ip": - return SemanticAttributes.NET_PEER_IP; case "net.peer.port": - return SemanticAttributes.NET_PEER_PORT; - case "db.system": - return SemanticAttributes.DB_SYSTEM; - case "db.name": - return SemanticAttributes.DB_NAME; - case "messaging.system": - return SemanticAttributes.MESSAGING_SYSTEM; - case "messaging.url": - return SemanticAttributes.MESSAGING_URL; - case "messaging.destination": - return SemanticAttributes.MESSAGING_DESTINATION; - case "rpc.system": - return SemanticAttributes.RPC_SYSTEM; - case "rpc.service": - return SemanticAttributes.RPC_SERVICE; + return AttributeKey.longKey(name); default: - throw new IllegalArgumentException("unknown key for name " + name); + return AttributeKey.stringKey(name); + } } @Then("Elastic bridged (transaction|span) OTel kind is {string}") - public void bridgeObjectKind(String kind){ + public void bridgeObjectKind(String kind) { assertThat(getBridgedAbstractSpan().getOtelKind()) .isEqualTo(OTelSpanKind.valueOf(kind)); } @@ -325,7 +302,7 @@ public void bridgedSpanTargetServiceType(String type, String name) { } @Then("OTel span status set to {string}") - public void setOtelSpanStatus(String status){ + public void setOtelSpanStatus(String status) { otelSpan.setStatus(StatusCode.valueOf(status.toUpperCase(Locale.ROOT))); } diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-test/pom.xml b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-test/pom.xml index 3768f468d0..bf8e6796f3 100644 --- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-test/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-test/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-opentelemetry - 1.52.1 + 1.52.2 ${project.groupId}:${project.artifactId} diff --git a/apm-agent-plugins/apm-opentelemetry/pom.xml b/apm-agent-plugins/apm-opentelemetry/pom.xml index 37c724a0a9..65da2592be 100644 --- a/apm-agent-plugins/apm-opentelemetry/pom.xml +++ b/apm-agent-plugins/apm-opentelemetry/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-plugins - 1.52.1 + 1.52.2 apm-opentelemetry @@ -20,7 +20,7 @@ to make sure that in the future we stay compatible with the previous version. --> 1.32.0 - 1.28.0-alpha + 1.30.0-rc.1 8 8 diff --git a/apm-agent-plugins/apm-opentracing-plugin/pom.xml b/apm-agent-plugins/apm-opentracing-plugin/pom.xml index 9cf3cccd43..a8eebe91f1 100644 --- a/apm-agent-plugins/apm-opentracing-plugin/pom.xml +++ b/apm-agent-plugins/apm-opentracing-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-opentracing-plugin diff --git a/apm-agent-plugins/apm-process-plugin/pom.xml b/apm-agent-plugins/apm-process-plugin/pom.xml index c7405c4bf0..346236b4bb 100644 --- a/apm-agent-plugins/apm-process-plugin/pom.xml +++ b/apm-agent-plugins/apm-process-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-profiling-plugin/pom.xml b/apm-agent-plugins/apm-profiling-plugin/pom.xml index 2eaa4673b2..720838ed47 100644 --- a/apm-agent-plugins/apm-profiling-plugin/pom.xml +++ b/apm-agent-plugins/apm-profiling-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-profiling-plugin diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingConfiguration.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingConfiguration.java index a58b4e67ea..5af1432f43 100644 --- a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingConfiguration.java +++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingConfiguration.java @@ -60,7 +60,7 @@ public class ProfilingConfiguration extends ConfigurationOptionProvider { .key("profiling_inferred_spans_logging_enabled") .configurationCategory(PROFILING_CATEGORY) .description("By default, async profiler prints warning messages about missing JVM symbols to standard output. \n" + - "Set this option to `true` to suppress such messages") + "Set this option to `false` to suppress such messages") .dynamic(true) .tags("added[1.37.0]") .buildWithDefault(true); diff --git a/apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml b/apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml index eb7fe1a0fa..c783dd897c 100644 --- a/apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml +++ b/apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml @@ -3,7 +3,7 @@ apm-quartz co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml b/apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml index d45f381f0b..3acef13733 100644 --- a/apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml +++ b/apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml @@ -3,7 +3,7 @@ apm-quartz co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml b/apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml index f61c96be4c..49cacf3956 100644 --- a/apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml +++ b/apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml @@ -3,7 +3,7 @@ apm-quartz co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-quartz/pom.xml b/apm-agent-plugins/apm-quartz/pom.xml index dfbb0dd12c..62d439037a 100644 --- a/apm-agent-plugins/apm-quartz/pom.xml +++ b/apm-agent-plugins/apm-quartz/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-quartz diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml index 3c7dcc92e8..e81663d314 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml @@ -5,7 +5,7 @@ apm-rabbitmq co.elastic.apm - 1.52.1 + 1.52.2 apm-rabbitmq-plugin diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/pom.xml similarity index 64% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/pom.xml index b057b00f49..f244b5a3ba 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/pom.xml @@ -1,21 +1,34 @@ - + 4.0.0 apm-rabbitmq co.elastic.apm - 1.52.1 + 1.52.2 - apm-rabbitmq-spring + apm-rabbitmq-spring5 ${project.groupId}:${project.artifactId} - 2.7.13 ${project.basedir}/../../.. + + + + + org.springframework.boot + spring-boot-dependencies + 2.7.11 + pom + import + + + + co.elastic.apm @@ -25,14 +38,7 @@ org.springframework.boot spring-boot-starter-amqp - ${version.spring-boot} provided - - - org.springframework.boot - spring-boot-starter-logging - - @@ -62,26 +68,28 @@ org.springframework.boot spring-boot-starter-web - ${version.spring-boot} test - - - org.springframework.boot - spring-boot-starter-logging - - org.springframework.boot spring-boot-starter-test - ${version.spring-boot} test - - - org.springframework.boot - spring-boot-starter-logging - - + + + + + + maven-jar-plugin + + + + test-jar + + + + + + diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/AmqpConstants.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/AmqpConstants.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/AmqpConstants.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/AmqpConstants.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchHelper.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchHelper.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchHelper.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchHelper.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchIteratorWrapper.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchIteratorWrapper.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchIteratorWrapper.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchIteratorWrapper.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchListWrapper.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchListWrapper.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchListWrapper.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageBatchListWrapper.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageListenerHelper.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageListenerHelper.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/MessageListenerHelper.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/MessageListenerHelper.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SetMessageListenerInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SetMessageListenerInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SetMessageListenerInstrumentation.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SetMessageListenerInstrumentation.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchMessageListenerInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchMessageListenerInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchMessageListenerInstrumentation.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchMessageListenerInstrumentation.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpMessageListenerInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpMessageListenerInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpMessageListenerInstrumentation.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpMessageListenerInstrumentation.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionHelper.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionHelper.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionHelper.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionHelper.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionNameUtil.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionNameUtil.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionNameUtil.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringAmqpTransactionNameUtil.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringBaseInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringBaseInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/SpringBaseInstrumentation.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/SpringBaseInstrumentation.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/header/SpringRabbitMQTextHeaderGetter.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/header/SpringRabbitMQTextHeaderGetter.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/header/SpringRabbitMQTextHeaderGetter.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/header/SpringRabbitMQTextHeaderGetter.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/header/package-info.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/header/package-info.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/header/package-info.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/header/package-info.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/package-info.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/package-info.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/java/co/elastic/apm/agent/rabbitmq/package-info.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/java/co/elastic/apm/agent/rabbitmq/package-info.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java similarity index 70% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java index 66e68627b0..f303209c44 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractAsyncRabbitMqTest.java @@ -18,18 +18,19 @@ */ package co.elastic.apm.agent.rabbitmq; -import org.junit.Test; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import org.junit.Test; import org.springframework.amqp.rabbit.AsyncRabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.util.concurrent.ListenableFuture; import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import static co.elastic.apm.agent.rabbitmq.TestConstants.ROUTING_KEY; import static co.elastic.apm.agent.rabbitmq.TestConstants.TOPIC_EXCHANGE_NAME; public abstract class AbstractAsyncRabbitMqTest extends RabbitMqTestBase { @@ -45,7 +46,7 @@ public abstract class AbstractAsyncRabbitMqTest extends RabbitMqTestBase { @Test public void verifyThatTransactionWithSpanCreated() throws TimeoutException { logger.info("Trying to send to async rabbit template"); - ListenableFuture future = asyncRabbitTemplate.convertSendAndReceive(TOPIC_EXCHANGE_NAME, TestConstants.ROUTING_KEY, MESSAGE); + Future future = invokeConvertAndSend(TOPIC_EXCHANGE_NAME, ROUTING_KEY, MESSAGE); try { String response = future.get(5, TimeUnit.SECONDS); logger.info("Got response = {}", response); @@ -55,4 +56,19 @@ public void verifyThatTransactionWithSpanCreated() throws TimeoutException { reporter.awaitTransactionCount(2); } + + /** + * {@link AsyncRabbitTemplate#convertSendAndReceive(String, String, Object)} changed it's return type + * in Spring 6, so we use reflection to invoke it safely for both spring 5 and 6. + */ + @SuppressWarnings("unchecked") + private Future invokeConvertAndSend(String topic, String routingKey, Object message) { + try { + return (Future) asyncRabbitTemplate.getClass() + .getMethod("convertSendAndReceive", String.class, String.class, Object.class) + .invoke(asyncRabbitTemplate, topic, routingKey, message); + } catch (Exception e) { + throw new IllegalStateException(e); + } + } } diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractRabbitMqTest.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractRabbitMqTest.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractRabbitMqTest.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AbstractRabbitMqTest.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AsyncRabbitListenerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AsyncRabbitListenerIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/AsyncRabbitListenerIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/AsyncRabbitListenerIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/DirectMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/DirectMessageListenerContainerIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/DirectMessageListenerContainerIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/DirectMessageListenerContainerIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/FanoutIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/FanoutIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/FanoutIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/FanoutIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/LambdaSimpleMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/LambdaSimpleMessageListenerContainerIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/LambdaSimpleMessageListenerContainerIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/LambdaSimpleMessageListenerContainerIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitListenerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitListenerIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitListenerIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitListenerIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMqTestBase.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMqTestBase.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMqTestBase.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMqTestBase.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/SimpleMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/SimpleMessageListenerContainerIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/SimpleMessageListenerContainerIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/SimpleMessageListenerContainerIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchIT.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchIT.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/SpringAmqpBatchIT.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/TestConstants.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/TestConstants.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/TestConstants.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/TestConstants.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/components/batch/BatchListenerComponent.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/components/batch/BatchListenerComponent.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/components/batch/BatchListenerComponent.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/components/batch/BatchListenerComponent.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/BaseConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/BaseConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/BaseConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/BaseConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/BatchConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/BatchConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/BatchConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/BatchConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/CommonRabbitListenerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/CommonRabbitListenerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/CommonRabbitListenerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/CommonRabbitListenerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/DefaultBindingSpringConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/DefaultBindingSpringConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/DefaultBindingSpringConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/DefaultBindingSpringConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/DirectMessageListenerContainerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/DirectMessageListenerContainerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/DirectMessageListenerContainerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/DirectMessageListenerContainerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/FanoutConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/FanoutConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/FanoutConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/FanoutConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaMessageListenerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaMessageListenerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaMessageListenerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaMessageListenerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaSimpleMessageListenerContainerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaSimpleMessageListenerContainerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaSimpleMessageListenerContainerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/LambdaSimpleMessageListenerContainerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/MessageListenerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/MessageListenerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/MessageListenerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/MessageListenerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/RabbitListenerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/RabbitListenerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/RabbitListenerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/RabbitListenerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/ReplyRabbitListenerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/ReplyRabbitListenerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/ReplyRabbitListenerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/ReplyRabbitListenerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/SimpleMessageListenerContainerConfiguration.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/SimpleMessageListenerContainerConfiguration.java similarity index 100% rename from apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/src/test/java/co/elastic/apm/agent/rabbitmq/config/SimpleMessageListenerContainerConfiguration.java rename to apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring5/src/test/java/co/elastic/apm/agent/rabbitmq/config/SimpleMessageListenerContainerConfiguration.java diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml index 9c5fd312c2..629bb72ce4 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml @@ -5,7 +5,7 @@ apm-rabbitmq co.elastic.apm - 1.52.1 + 1.52.2 apm-rabbitmq-test-3 diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml index 99d0ebe58b..963b6d847e 100644 --- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml @@ -5,7 +5,7 @@ apm-rabbitmq co.elastic.apm - 1.52.1 + 1.52.2 apm-rabbitmq-test-4 diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/pom.xml new file mode 100644 index 0000000000..27369f0e5a --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/pom.xml @@ -0,0 +1,93 @@ + + + 4.0.0 + + + apm-rabbitmq + co.elastic.apm + 1.52.2 + + + apm-rabbitmq-test-spring6 + ${project.groupId}:${project.artifactId} + + + true + ${project.basedir}/../../.. + + + + + + + org.springframework.boot + spring-boot-dependencies + 3.4.1 + pom + import + + + + + + + co.elastic.apm + apm-rabbitmq-plugin + ${project.version} + + + org.springframework.boot + spring-boot-starter-amqp + provided + + + + co.elastic.apm + apm-rabbitmq-plugin + ${project.version} + test-jar + test + + + co.elastic.apm + apm-rabbitmq-spring5 + ${project.version} + test-jar + test + + + co.elastic.apm + apm-rabbitmq-spring5 + ${project.version} + test + + + co.elastic.apm + apm-agent-api + ${project.version} + test + + + co.elastic.apm + apm-api-plugin + ${project.version} + test + + + org.testcontainers + rabbitmq + test + + + org.springframework.boot + spring-boot-starter-web + test + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6AsyncRabbitListenerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6AsyncRabbitListenerIT.java new file mode 100644 index 0000000000..f4810036ba --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6AsyncRabbitListenerIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6AsyncRabbitListenerIT extends AsyncRabbitListenerIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6DirectMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6DirectMessageListenerContainerIT.java new file mode 100644 index 0000000000..04a28c35f7 --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6DirectMessageListenerContainerIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6DirectMessageListenerContainerIT extends DirectMessageListenerContainerIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6FanoutIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6FanoutIT.java new file mode 100644 index 0000000000..8d39ce15cd --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6FanoutIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6FanoutIT extends FanoutIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6LambdaSimpleMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6LambdaSimpleMessageListenerContainerIT.java new file mode 100644 index 0000000000..c9326164c5 --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6LambdaSimpleMessageListenerContainerIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6LambdaSimpleMessageListenerContainerIT extends LambdaSimpleMessageListenerContainerIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6RabbitListenerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6RabbitListenerIT.java new file mode 100644 index 0000000000..c3e3146779 --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6RabbitListenerIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6RabbitListenerIT extends RabbitListenerIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6SimpleMessageListenerContainerIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6SimpleMessageListenerContainerIT.java new file mode 100644 index 0000000000..46714a530e --- /dev/null +++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-spring6/src/test/java/co/elastic/apm/agent/rabbitmq/Spring6SimpleMessageListenerContainerIT.java @@ -0,0 +1,23 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package co.elastic.apm.agent.rabbitmq; + +public class Spring6SimpleMessageListenerContainerIT extends SimpleMessageListenerContainerIT { + +} diff --git a/apm-agent-plugins/apm-rabbitmq/pom.xml b/apm-agent-plugins/apm-rabbitmq/pom.xml index e8952a14f3..d223dcf0f9 100644 --- a/apm-agent-plugins/apm-rabbitmq/pom.xml +++ b/apm-agent-plugins/apm-rabbitmq/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-rabbitmq @@ -21,7 +21,8 @@ apm-rabbitmq-plugin apm-rabbitmq-test-3 apm-rabbitmq-test-4 - apm-rabbitmq-spring + apm-rabbitmq-spring5 + apm-rabbitmq-test-spring6 diff --git a/apm-agent-plugins/apm-reactor-plugin/pom.xml b/apm-agent-plugins/apm-reactor-plugin/pom.xml index fe2b837c77..0860222cb1 100644 --- a/apm-agent-plugins/apm-reactor-plugin/pom.xml +++ b/apm-agent-plugins/apm-reactor-plugin/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-plugins - 1.52.1 + 1.52.2 apm-reactor-plugin diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml index a28abb8604..e5f515dccc 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jedis-2-tests diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml index 6fe9fc82fe..9ccbf3ae72 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jedis-3-tests diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml index 102dd5509f..7e13611165 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jedis-4-plugin diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml index 71d3818c4d..cb5b2070cf 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jedis-5-tests diff --git a/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml index 743f91b463..c6620f65db 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-jedis-plugin diff --git a/apm-agent-plugins/apm-redis-plugin/apm-lettuce-3-tests/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-lettuce-3-tests/pom.xml index 46e7f76c99..99cc59dc04 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-lettuce-3-tests/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-lettuce-3-tests/pom.xml @@ -3,7 +3,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml index e00faef793..b7ca70f30e 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml @@ -3,7 +3,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml index 668de9087e..2d60816b82 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-redis-common diff --git a/apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/pom.xml index bd100c7950..26f499671a 100644 --- a/apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/pom.xml @@ -5,7 +5,7 @@ apm-redis-plugin co.elastic.apm - 1.52.1 + 1.52.2 apm-redisson-plugin diff --git a/apm-agent-plugins/apm-redis-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/pom.xml index 700955bb3b..2b504e1a15 100644 --- a/apm-agent-plugins/apm-redis-plugin/pom.xml +++ b/apm-agent-plugins/apm-redis-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-redis-plugin diff --git a/apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml b/apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml index 79317141f1..c7ffac6d2c 100644 --- a/apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml +++ b/apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-scala-concurrent-plugin diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin-jakartaee-test/pom.xml b/apm-agent-plugins/apm-scheduled-annotation-plugin-jakartaee-test/pom.xml index c5785a6bc5..f120dc9e95 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin-jakartaee-test/pom.xml +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin-jakartaee-test/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml b/apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml index 8591cb3ab1..88df4094c3 100644 --- a/apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml +++ b/apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-scheduled-annotation-plugin diff --git a/apm-agent-plugins/apm-servlet-jakarta-test/pom.xml b/apm-agent-plugins/apm-servlet-jakarta-test/pom.xml index 37201ad8c9..f96ba54767 100644 --- a/apm-agent-plugins/apm-servlet-jakarta-test/pom.xml +++ b/apm-agent-plugins/apm-servlet-jakarta-test/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-servlet-jakarta-test diff --git a/apm-agent-plugins/apm-servlet-plugin/pom.xml b/apm-agent-plugins/apm-servlet-plugin/pom.xml index 9f27fa4820..6a3985eda5 100644 --- a/apm-agent-plugins/apm-servlet-plugin/pom.xml +++ b/apm-agent-plugins/apm-servlet-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-servlet-plugin diff --git a/apm-agent-plugins/apm-sparkjava-plugin/pom.xml b/apm-agent-plugins/apm-sparkjava-plugin/pom.xml index fac2dd9989..b681fd5221 100644 --- a/apm-agent-plugins/apm-sparkjava-plugin/pom.xml +++ b/apm-agent-plugins/apm-sparkjava-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-restclient-test/pom.xml b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-restclient-test/pom.xml index b4bdf40e38..6df5b0aa3f 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-restclient-test/pom.xml +++ b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-restclient-test/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-resttemplate - 1.52.1 + 1.52.2 apm-spring-restclient-test @@ -20,7 +20,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.4.1 pom import diff --git a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/pom.xml b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/pom.xml index 5606430588..97fabeec33 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/pom.xml +++ b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-resttemplate - 1.52.1 + 1.52.2 apm-spring-resttemplate-plugin @@ -23,7 +23,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.4.1 pom import @@ -52,6 +52,7 @@ com.squareup.okhttp3 okhttp + ${version.okhttp} test diff --git a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/test/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateInstrumentationTest.java b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/test/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateInstrumentationTest.java index d822e255b3..c666384e7e 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/test/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateInstrumentationTest.java +++ b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-plugin/src/test/java/co/elastic/apm/agent/resttemplate/SpringRestTemplateInstrumentationTest.java @@ -65,6 +65,11 @@ protected boolean isBodyCapturingSupported() { return Java17Code.isBodyCapturingSupported(restTemplate); } + @Override + public boolean isTestHttpCallWithUserInfoEnabled() { + return Java17Code.isTestHttpCallWithUserInfoEnabled(restTemplate); + } + @Override protected void performPost(String path, byte[] content, String contentTypeHeader) throws Exception { Java17Code.performPost(restTemplate, path, content, contentTypeHeader); @@ -106,5 +111,15 @@ public static boolean isBodyCapturingSupported(Object restTemplateObj) { return true; } + public static boolean isTestHttpCallWithUserInfoEnabled(Object restTemplateObj) { + RestTemplate restTemplate = (RestTemplate) restTemplateObj; + if (restTemplate.getRequestFactory() instanceof HttpComponentsClientHttpRequestFactory) { + // newer http components don't support userinfo in URI anymore: + // I/O error on GET request for "http://user:passwd@localhost:50931/": Request URI authority contains deprecated userinfo component + return false; + } + return true; + } + } } diff --git a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-test/pom.xml b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-test/pom.xml index 0c1a761d07..3720c24f8d 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-test/pom.xml +++ b/apm-agent-plugins/apm-spring-resttemplate/apm-spring-resttemplate-test/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-resttemplate - 1.52.1 + 1.52.2 apm-spring-resttemplate-test diff --git a/apm-agent-plugins/apm-spring-resttemplate/pom.xml b/apm-agent-plugins/apm-spring-resttemplate/pom.xml index 365f2fc375..2ee2fc0f34 100644 --- a/apm-agent-plugins/apm-spring-resttemplate/pom.xml +++ b/apm-agent-plugins/apm-spring-resttemplate/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-plugins - 1.52.1 + 1.52.2 apm-spring-resttemplate diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/pom.xml index 0f7b6cd815..7767a62e2a 100755 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webclient-plugin diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/test/java/co/elastic/apm/agent/springwebclient/WebClientInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/test/java/co/elastic/apm/agent/springwebclient/WebClientInstrumentationTest.java index d949a8b7e0..7c6b9e1248 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/test/java/co/elastic/apm/agent/springwebclient/WebClientInstrumentationTest.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webclient-plugin/src/test/java/co/elastic/apm/agent/springwebclient/WebClientInstrumentationTest.java @@ -39,30 +39,33 @@ public class WebClientInstrumentationTest extends AbstractHttpClientInstrumentat private final RequestStrategy strategy; - private final boolean isNetty; + private final boolean circularRedirectSupported; - public WebClientInstrumentationTest(String clientIgnored, Object webClient, RequestStrategy strategy, boolean isNetty) { + private final boolean uriUserInfoSupported; + + public WebClientInstrumentationTest(String clientName, Object webClient, RequestStrategy strategy) { this.webClient = webClient; this.strategy = strategy; - this.isNetty = isNetty; + this.circularRedirectSupported = !"netty".equals(clientName); + this.uriUserInfoSupported = !"hc5".equals(clientName) && !"netty".equals(clientName); } @Parameterized.Parameters(name = "client = {0}, request strategy = {2}") public static Object[][] testParams() { if (JvmRuntimeInfo.ofCurrentVM().getMajorVersion() >= 17) { return new Object[][]{ - {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE, false}, - {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE_TO_FLUX, false}, - {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE_TO_MONO, false}, - {"jetty", Clients.jettyClient(), RequestStrategy.RETRIEVE, false}, - {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE, true}, - {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE_TO_FLUX, true}, - {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE_TO_MONO, true}, - {"netty", Clients.nettyClient(), RequestStrategy.RETRIEVE, true}, - {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE, false}, - {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE_TO_FLUX, false}, - {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE_TO_MONO, false}, - {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.RETRIEVE, false} + {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE}, + {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE_TO_FLUX}, + {"jetty", Clients.jettyClient(), RequestStrategy.EXCHANGE_TO_MONO}, + {"jetty", Clients.jettyClient(), RequestStrategy.RETRIEVE}, + {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE}, + {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE_TO_FLUX}, + {"netty", Clients.nettyClient(), RequestStrategy.EXCHANGE_TO_MONO}, + {"netty", Clients.nettyClient(), RequestStrategy.RETRIEVE}, + {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE}, + {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE_TO_FLUX}, + {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.EXCHANGE_TO_MONO}, + {"hc5", Clients.reactiveHttpClient5(), RequestStrategy.RETRIEVE} }; } else { return new Object[0][0]; @@ -72,13 +75,13 @@ public static Object[][] testParams() { @Override public boolean isRequireCheckErrorWhenCircularRedirect() { // circular redirect does not trigger an error to capture with netty - return !isNetty; + return circularRedirectSupported; } @Override public boolean isTestHttpCallWithUserInfoEnabled() { // user info URI does not work with netty - return !isNetty; + return uriUserInfoSupported; } diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/pom.xml index 2467fc839f..5a801be31e 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webflux-common-spring5 diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common/pom.xml index d25add2cae..aaac38be80 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webflux-common diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml index 190c56751b..1d60f9e316 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webflux-plugin diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml index a9dfcdd16c..2732813a07 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webflux-spring5 diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java index e3bc75bda2..e2d0cfa7a7 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java @@ -145,7 +145,7 @@ public void onError(Throwable t) { Transaction transaction = getTransaction(); doEnter("onError", transaction); try { - + WebfluxHelper.setFrameworkInfo(transaction); // We have to capture the transaction name just before it's actually ended to prevent // concurrency issues as the transaction is accessed from multiple threads when created by a servlet. WebfluxHelper.setTransactionName(transaction, exchange); @@ -167,7 +167,7 @@ public void onComplete() { Transaction transaction = getTransaction(); doEnter("onComplete", transaction); try { - + WebfluxHelper.setFrameworkInfo(transaction); // We have to capture the transaction name just before it's actually ended to prevent // concurrency issues as the transaction is accessed from multiple threads when created by a servlet. WebfluxHelper.setTransactionName(transaction, exchange); @@ -209,7 +209,7 @@ private void cancelTransaction() { if (transaction == null) { return; } - + WebfluxHelper.setFrameworkInfo(transaction); WebfluxHelper.setTransactionName(transaction, exchange); WebfluxHelper.endTransaction(null, transaction, exchange); diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java index 01a68fd110..3cdcdc3fb1 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java @@ -19,6 +19,7 @@ package co.elastic.apm.agent.springwebflux; import co.elastic.apm.agent.httpserver.HttpServerHelper; +import co.elastic.apm.agent.sdk.internal.util.VersionUtils; import co.elastic.apm.agent.tracer.GlobalTracer; import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap; import co.elastic.apm.agent.tracer.util.ResultUtil; @@ -65,6 +66,8 @@ public class WebfluxHelper { + private static final String FRAMEWORK_NAME = "Spring Webflux"; + private static final Logger log = LoggerFactory.getLogger(WebfluxHelper.class); private static final Logger oneTimeResponseCodeErrorLogger = LoggerUtils.logOnce(log); @@ -182,6 +185,13 @@ public static void endTransaction(@Nullable Throwable thrown, @Nullable Transact } } + public static void setFrameworkInfo(@Nullable Transaction transaction) { + if (transaction != null) { + transaction.setFrameworkName(FRAMEWORK_NAME); + transaction.setFrameworkVersion(VersionUtils.getVersion(HandlerMethod.class, "org.springframework", "webflux")); + } + } + public static void setTransactionName(@Nullable Transaction transaction, ServerWebExchange exchange) { if (transaction == null) { return; diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java index cc525a7f3a..3ee10c86d7 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java @@ -18,12 +18,13 @@ */ package co.elastic.apm.agent.springwebflux; -import co.elastic.apm.agent.sdk.weakconcurrent.WeakKeySoftValueLoadingCache; -import co.elastic.apm.agent.tracer.Transaction; import co.elastic.apm.agent.sdk.logging.Logger; import co.elastic.apm.agent.sdk.logging.LoggerFactory; +import co.elastic.apm.agent.sdk.weakconcurrent.WeakKeySoftValueLoadingCache; +import co.elastic.apm.agent.tracer.Transaction; import org.springframework.http.server.reactive.AbstractServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.http.server.reactive.ServerHttpRequestDecorator; import org.springframework.web.server.ServerWebExchange; import javax.annotation.Nullable; @@ -60,19 +61,23 @@ public static Transaction getServletTransaction(ServerWebExchange exchange) { // While the active transaction is the one created by Servlet, it would rely on the fact that we are on the // same thread as the one that created the transaction, which is an implementation detail. - - Transaction transaction = null; - ServerHttpRequest exchangeRequest = exchange.getRequest(); + return getTransactionFromRequest(exchangeRequest); + } + + @Nullable + private static Transaction getTransactionFromRequest(ServerHttpRequest exchangeRequest) { if (exchangeRequest instanceof AbstractServerHttpRequest) { Object nativeRequest = ((AbstractServerHttpRequest) exchangeRequest).getNativeRequest(); // note: attribute name is defined in Servlet plugin and should be kept in sync - transaction = (Transaction) getServletAttribute(nativeRequest, "co.elastic.apm.agent.servlet.ServletApiAdvice.transaction"); + return (Transaction) getServletAttribute(nativeRequest, "co.elastic.apm.agent.servlet.ServletApiAdvice.transaction"); + } else if (exchangeRequest instanceof ServerHttpRequestDecorator) { + ServerHttpRequestDecorator decorator = (ServerHttpRequestDecorator) exchangeRequest; + return getTransactionFromRequest(decorator.getDelegate()); } - - return transaction; + return null; } /** diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java index e27585baad..f4cacf4877 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java @@ -19,16 +19,16 @@ package co.elastic.apm.agent.springwebflux; import co.elastic.apm.agent.AbstractInstrumentationTest; +import co.elastic.apm.agent.common.util.WildcardMatcher; import co.elastic.apm.agent.configuration.CoreConfigurationImpl; import co.elastic.apm.agent.impl.context.RequestImpl; import co.elastic.apm.agent.impl.context.UrlImpl; -import co.elastic.apm.agent.impl.transaction.TransactionImpl; -import co.elastic.apm.agent.tracer.configuration.WebConfiguration; import co.elastic.apm.agent.impl.error.ErrorCaptureImpl; -import co.elastic.apm.agent.common.util.WildcardMatcher; +import co.elastic.apm.agent.impl.transaction.TransactionImpl; import co.elastic.apm.agent.springwebflux.testapp.GreetingWebClient; import co.elastic.apm.agent.springwebflux.testapp.WebFluxApplication; import co.elastic.apm.agent.testutils.DisabledOnAppleSilicon; +import co.elastic.apm.agent.tracer.configuration.WebConfiguration; import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap; import org.assertj.core.data.Offset; import org.junit.jupiter.api.AfterAll; @@ -38,6 +38,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; +import org.springframework.core.SpringVersion; import org.springframework.http.codec.ServerSentEvent; import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Hooks; @@ -133,7 +134,7 @@ private void hello(boolean expectHeaders) { assertThat(headersCount) .describedAs("unexpected headers count") - .isEqualTo(6); + .isGreaterThanOrEqualTo(6); assertThat(headers.getFirst("random-value")) .describedAs("non-standard request headers should be captured") @@ -202,7 +203,7 @@ private Predicate expectClientError(int expectedStatus) { } @ParameterizedTest - @CsvSource({"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"}) + @CsvSource({"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"}) void methodMapping(String method) { client.setHeader("Authorization", BASIC_AUTH_HEADER_VALUE); @@ -464,6 +465,13 @@ static TransactionImpl checkTransaction(TransactionImpl transaction, String expe assertThat(transaction.getResult()) .isEqualTo(String.format("HTTP %dxx", expectedStatus / 100)); + assertThat(transaction.getFrameworkName()) + .isEqualTo("Spring Webflux"); + + assertThat(transaction.getFrameworkVersion()) + .isNotBlank() + .isEqualTo(SpringVersion.getVersion()); + return transaction; } diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/pom.xml index 7bd01005c6..733b2e9295 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-testapp/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-spring-webflux - 1.52.1 + 1.52.2 apm-spring-webflux-testapp @@ -102,7 +102,7 @@ org.springframework.boot spring-boot-maven-plugin - 3.3.0 + 3.4.2 co.elastic.apm.agent.springwebflux.testapp.WebFluxApplication diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml index 493ad29a1d..736f655220 100644 --- a/apm-agent-plugins/apm-spring-webflux/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-plugins - 1.52.1 + 1.52.2 apm-spring-webflux @@ -18,7 +18,7 @@ 2.7.16 - 3.3.4 + 3.4.1 diff --git a/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml b/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml index ba5841e816..d9bcddcb31 100644 --- a/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml +++ b/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml @@ -5,7 +5,7 @@ apm-spring-webmvc co.elastic.apm - 1.52.1 + 1.52.2 apm-spring-webmvc-plugin @@ -22,7 +22,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.4.1 pom import diff --git a/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml b/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml index e01857f6cb..5ebcde1114 100644 --- a/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml +++ b/apm-agent-plugins/apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml @@ -5,7 +5,7 @@ apm-spring-webmvc co.elastic.apm - 1.52.1 + 1.52.2 apm-spring-webmvc-spring5 diff --git a/apm-agent-plugins/apm-spring-webmvc/pom.xml b/apm-agent-plugins/apm-spring-webmvc/pom.xml index a123b69319..1df417018a 100644 --- a/apm-agent-plugins/apm-spring-webmvc/pom.xml +++ b/apm-agent-plugins/apm-spring-webmvc/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.4.1 pom import diff --git a/apm-agent-plugins/apm-struts-plugin/pom.xml b/apm-agent-plugins/apm-struts-plugin/pom.xml index 7b41f8c8a0..94fe8be690 100644 --- a/apm-agent-plugins/apm-struts-plugin/pom.xml +++ b/apm-agent-plugins/apm-struts-plugin/pom.xml @@ -3,7 +3,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/apm-agent-plugins/apm-urlconnection-plugin/pom.xml b/apm-agent-plugins/apm-urlconnection-plugin/pom.xml index f8e996ea03..a31b09fdeb 100644 --- a/apm-agent-plugins/apm-urlconnection-plugin/pom.xml +++ b/apm-agent-plugins/apm-urlconnection-plugin/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-urlconnection-plugin diff --git a/apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml b/apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml index bf66ab617f..d2c97aaaac 100644 --- a/apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml +++ b/apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml @@ -5,7 +5,7 @@ apm-vertx co.elastic.apm - 1.52.1 + 1.52.2 apm-vertx-common diff --git a/apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml b/apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml index 1f06d8657a..bbf8d27901 100644 --- a/apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml +++ b/apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml @@ -5,7 +5,7 @@ apm-vertx co.elastic.apm - 1.52.1 + 1.52.2 apm-vertx3-plugin diff --git a/apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml b/apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml index 3706a57c47..0995a55bf5 100644 --- a/apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml +++ b/apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml @@ -5,7 +5,7 @@ apm-vertx co.elastic.apm - 1.52.1 + 1.52.2 apm-vertx3-test-latest diff --git a/apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml b/apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml index f7e4aba8df..b5e1d0fdc3 100644 --- a/apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml +++ b/apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml @@ -5,7 +5,7 @@ apm-vertx co.elastic.apm - 1.52.1 + 1.52.2 apm-vertx4-plugin diff --git a/apm-agent-plugins/apm-vertx/pom.xml b/apm-agent-plugins/apm-vertx/pom.xml index 70ce21495c..9501334f84 100644 --- a/apm-agent-plugins/apm-vertx/pom.xml +++ b/apm-agent-plugins/apm-vertx/pom.xml @@ -5,7 +5,7 @@ apm-agent-plugins co.elastic.apm - 1.52.1 + 1.52.2 apm-vertx diff --git a/apm-agent-plugins/pom.xml b/apm-agent-plugins/pom.xml index 00134d0b60..668e97ec95 100644 --- a/apm-agent-plugins/pom.xml +++ b/apm-agent-plugins/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-agent-plugins diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml index d3823df57e..8c8935be6e 100644 --- a/apm-agent-tracer/pom.xml +++ b/apm-agent-tracer/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-agent-parent - 1.52.1 + 1.52.2 apm-agent-tracer diff --git a/apm-opentracing/pom.xml b/apm-opentracing/pom.xml index 2eb17a650d..796c80742f 100644 --- a/apm-opentracing/pom.xml +++ b/apm-opentracing/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 apm-opentracing diff --git a/cloudfoundry/index.yml b/cloudfoundry/index.yml index f247aaecdc..7fb36cff39 100644 --- a/cloudfoundry/index.yml +++ b/cloudfoundry/index.yml @@ -65,3 +65,4 @@ 1.50.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.50.0/elastic-apm-agent-1.50.0.jar 1.51.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.51.0/elastic-apm-agent-1.51.0.jar 1.52.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.52.0/elastic-apm-agent-1.52.0.jar +1.52.1: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.52.1/elastic-apm-agent-1.52.1.jar diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 6ff4717594..b059b76835 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -1271,6 +1271,7 @@ Example: `0ms`. ==== `central_config` (added[1.8.0]) When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration. +The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined. <> @@ -2817,7 +2818,7 @@ NOTE: This feature is not available on Windows and on OpenJ9 ==== `profiling_inferred_spans_logging_enabled` (added[1.37.0]) By default, async profiler prints warning messages about missing JVM symbols to standard output. -Set this option to `true` to suppress such messages +Set this option to `false` to suppress such messages <> @@ -4087,6 +4088,7 @@ Example: `5ms`. # trace_methods_duration_threshold=0ms # When enabled, the agent will make periodic requests to the APM Server to fetch updated configuration. +# The frequency of the periodic request is driven by the `Cache-Control` header returned from APM Server/Integration, falling back to 5 minutes if not defined. # # This setting can be changed at runtime # Type: Boolean @@ -4855,7 +4857,7 @@ Example: `5ms`. # profiling_inferred_spans_enabled=false # By default, async profiler prints warning messages about missing JVM symbols to standard output. -# Set this option to `true` to suppress such messages +# Set this option to `false` to suppress such messages # # This setting can be changed at runtime # Type: Boolean diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc index fad18447c4..353b48809e 100644 --- a/docs/troubleshooting.asciidoc +++ b/docs/troubleshooting.asciidoc @@ -288,6 +288,10 @@ further information about how to download this file can be found <>. +With Oracle Weblogic application server wildcard TLS certificates are not allowed by default, when this +happens a message error like this is visible in agent logs: `Hostname verification failed: HostnameVerifier=weblogic.security.utils.SSLWLSHostnameVerifier`. +Disabling this extra check can be done with `-Dweblogic.security.SSL.ignoreHostnameVerification=true`. + For other SSL/TLS related problems, - check out https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#Troubleshooting[the JSSE troubleshooting section]. diff --git a/elastic-apm-agent-java8/pom.xml b/elastic-apm-agent-java8/pom.xml index 231dd21767..5bac58a85b 100644 --- a/elastic-apm-agent-java8/pom.xml +++ b/elastic-apm-agent-java8/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-parent - 1.52.1 + 1.52.2 elastic-apm-agent-java8 diff --git a/elastic-apm-agent-premain/pom.xml b/elastic-apm-agent-premain/pom.xml index 35e9c181d9..034a882bea 100644 --- a/elastic-apm-agent-premain/pom.xml +++ b/elastic-apm-agent-premain/pom.xml @@ -3,7 +3,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/elastic-apm-agent/pom.xml b/elastic-apm-agent/pom.xml index a162258d9a..b81b6dea28 100644 --- a/elastic-apm-agent/pom.xml +++ b/elastic-apm-agent/pom.xml @@ -5,7 +5,7 @@ co.elastic.apm apm-agent-parent - 1.52.1 + 1.52.2 elastic-apm-agent diff --git a/integration-tests/application-server-integration-tests/pom.xml b/integration-tests/application-server-integration-tests/pom.xml index ed08f5ee98..899b71f2d8 100644 --- a/integration-tests/application-server-integration-tests/pom.xml +++ b/integration-tests/application-server-integration-tests/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 application-server-integration-tests diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/JakartaeeTomcatWithSecurityManagerIT.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/JakartaeeTomcatWithSecurityManagerIT.java index 351cb72013..73b55306f7 100644 --- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/JakartaeeTomcatWithSecurityManagerIT.java +++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/JakartaeeTomcatWithSecurityManagerIT.java @@ -18,7 +18,6 @@ */ package co.elastic.apm.servlet; -import co.elastic.apm.agent.test.AgentTestContainer; import co.elastic.apm.servlet.tests.JakartaExternalPluginTestApp; import co.elastic.apm.servlet.tests.JakartaeeServletApiTestApp; import co.elastic.apm.servlet.tests.TestApp; @@ -38,8 +37,9 @@ public JakartaeeTomcatWithSecurityManagerIT(final String tomcatVersion) { @Parameterized.Parameters(name = "Tomcat {0}") public static Iterable data() { return Arrays.asList(new Object[][]{ - {"10.0.10-jdk11-adoptopenjdk-hotspot"}, - {"10.1.0-jdk17-temurin"}, // Servlet 6.x + {"10.0.10-jdk11-adoptopenjdk-hotspot"} + // TODO: investigate why on 10.1.0-jdk17-temurin it returns 500 for the status page + //{"10.1.0-jdk17-temurin"}, // Servlet 6.x }); } diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/TomcatIT.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/TomcatIT.java index d161d0b52c..f321dcc3f8 100644 --- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/TomcatIT.java +++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/TomcatIT.java @@ -40,7 +40,6 @@ public TomcatIT(final String tomcatVersion) { @Parameterized.Parameters(name = "Tomcat {0}") public static Iterable data() { return Arrays.asList(new Object[][]{ - {"8.5.0-jre8"}, {"9-jre11-slim"}, {"9.0.39-jdk14-openjdk-oracle"}, {"jdk8-adoptopenjdk-openj9"}, diff --git a/integration-tests/aws-lambda-test/pom.xml b/integration-tests/aws-lambda-test/pom.xml index fe8dac1b0c..39ce6db685 100644 --- a/integration-tests/aws-lambda-test/pom.xml +++ b/integration-tests/aws-lambda-test/pom.xml @@ -3,7 +3,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-app/cdi-app-dependent/pom.xml b/integration-tests/cdi-app/cdi-app-dependent/pom.xml index 3699ccba8b..0308f1a4e8 100644 --- a/integration-tests/cdi-app/cdi-app-dependent/pom.xml +++ b/integration-tests/cdi-app/cdi-app-dependent/pom.xml @@ -4,7 +4,7 @@ cdi-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-app/cdi-app-standalone/pom.xml b/integration-tests/cdi-app/cdi-app-standalone/pom.xml index c105b6b533..7070dcbbbf 100644 --- a/integration-tests/cdi-app/cdi-app-standalone/pom.xml +++ b/integration-tests/cdi-app/cdi-app-standalone/pom.xml @@ -4,7 +4,7 @@ cdi-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-app/pom.xml b/integration-tests/cdi-app/pom.xml index 7df72c4591..e84a5ff06c 100644 --- a/integration-tests/cdi-app/pom.xml +++ b/integration-tests/cdi-app/pom.xml @@ -4,7 +4,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml b/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml index 9c018c42da..b4062f9197 100644 --- a/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml +++ b/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml @@ -4,7 +4,7 @@ cdi-jakartaee-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml b/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml index 05f0781900..8d99390635 100644 --- a/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml +++ b/integration-tests/cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml @@ -4,7 +4,7 @@ cdi-jakartaee-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/cdi-jakartaee-app/pom.xml b/integration-tests/cdi-jakartaee-app/pom.xml index dca309c6b4..bf744ae6cc 100644 --- a/integration-tests/cdi-jakartaee-app/pom.xml +++ b/integration-tests/cdi-jakartaee-app/pom.xml @@ -4,7 +4,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-app/pom.xml b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-app/pom.xml index 63f709a245..8404da85a0 100644 --- a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-app/pom.xml +++ b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-app/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm external-plugin-otel-test - 1.52.1 + 1.52.2 external-plugin-otel-test-app diff --git a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin1/pom.xml b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin1/pom.xml index efec001164..95762a4e90 100644 --- a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin1/pom.xml +++ b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin1/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm external-plugin-otel-test - 1.52.1 + 1.52.2 external-plugin-otel-test-plugin1 diff --git a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin2/pom.xml b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin2/pom.xml index 29fd42fcf7..1c5b172b15 100644 --- a/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin2/pom.xml +++ b/integration-tests/external-plugin-otel-test/external-plugin-otel-test-plugin2/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm external-plugin-otel-test - 1.52.1 + 1.52.2 external-plugin-otel-test-plugin2 diff --git a/integration-tests/external-plugin-otel-test/pom.xml b/integration-tests/external-plugin-otel-test/pom.xml index 37128b0a21..2ae598ff6f 100644 --- a/integration-tests/external-plugin-otel-test/pom.xml +++ b/integration-tests/external-plugin-otel-test/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm integration-tests - 1.52.1 + 1.52.2 external-plugin-otel-test diff --git a/integration-tests/external-plugin-test/external-plugin-app/pom.xml b/integration-tests/external-plugin-test/external-plugin-app/pom.xml index a8b00f8df9..46e370e047 100644 --- a/integration-tests/external-plugin-test/external-plugin-app/pom.xml +++ b/integration-tests/external-plugin-test/external-plugin-app/pom.xml @@ -6,7 +6,7 @@ external-plugin-test co.elastic.apm - 1.52.1 + 1.52.2 external-plugin-app diff --git a/integration-tests/external-plugin-test/external-plugin-jakarta-app/pom.xml b/integration-tests/external-plugin-test/external-plugin-jakarta-app/pom.xml index 1a616ade2b..d7f671228d 100644 --- a/integration-tests/external-plugin-test/external-plugin-jakarta-app/pom.xml +++ b/integration-tests/external-plugin-test/external-plugin-jakarta-app/pom.xml @@ -6,7 +6,7 @@ external-plugin-test co.elastic.apm - 1.52.1 + 1.52.2 external-plugin-jakarta-app diff --git a/integration-tests/external-plugin-test/external-plugin/pom.xml b/integration-tests/external-plugin-test/external-plugin/pom.xml index 2440381090..5f8985465b 100644 --- a/integration-tests/external-plugin-test/external-plugin/pom.xml +++ b/integration-tests/external-plugin-test/external-plugin/pom.xml @@ -6,7 +6,7 @@ external-plugin-test co.elastic.apm - 1.52.1 + 1.52.2 external-plugin diff --git a/integration-tests/external-plugin-test/plugin-instrumentation-target/pom.xml b/integration-tests/external-plugin-test/plugin-instrumentation-target/pom.xml index 4ae2dd9dca..115ca39ef2 100644 --- a/integration-tests/external-plugin-test/plugin-instrumentation-target/pom.xml +++ b/integration-tests/external-plugin-test/plugin-instrumentation-target/pom.xml @@ -6,7 +6,7 @@ external-plugin-test co.elastic.apm - 1.52.1 + 1.52.2 plugin-instrumentation-target diff --git a/integration-tests/external-plugin-test/pom.xml b/integration-tests/external-plugin-test/pom.xml index be504056fa..e58a26c734 100644 --- a/integration-tests/external-plugin-test/pom.xml +++ b/integration-tests/external-plugin-test/pom.xml @@ -3,7 +3,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml b/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml index 9d384ae16b..94f8b54004 100644 --- a/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml +++ b/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml @@ -3,7 +3,7 @@ jakartaee-jsf-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml b/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml index f5aa99af2d..fbbe87d2d6 100644 --- a/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml +++ b/integration-tests/jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml @@ -3,7 +3,7 @@ jakartaee-jsf-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/jakartaee-jsf-app/pom.xml b/integration-tests/jakartaee-jsf-app/pom.xml index e6cc8e5242..0d2905f95d 100644 --- a/integration-tests/jakartaee-jsf-app/pom.xml +++ b/integration-tests/jakartaee-jsf-app/pom.xml @@ -3,7 +3,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 pom diff --git a/integration-tests/jakartaee-simple-webapp/pom.xml b/integration-tests/jakartaee-simple-webapp/pom.xml index 7df42cca42..52d75bb575 100644 --- a/integration-tests/jakartaee-simple-webapp/pom.xml +++ b/integration-tests/jakartaee-simple-webapp/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 jakartaee-simple-webapp diff --git a/integration-tests/jsf-app/jsf-app-dependent/pom.xml b/integration-tests/jsf-app/jsf-app-dependent/pom.xml index b51fa009ee..b9cdbd5edf 100644 --- a/integration-tests/jsf-app/jsf-app-dependent/pom.xml +++ b/integration-tests/jsf-app/jsf-app-dependent/pom.xml @@ -4,7 +4,7 @@ jsf-app co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/jsf-app/jsf-app-standalone/pom.xml b/integration-tests/jsf-app/jsf-app-standalone/pom.xml index ce9ffe7af1..e7b7d85636 100644 --- a/integration-tests/jsf-app/jsf-app-standalone/pom.xml +++ b/integration-tests/jsf-app/jsf-app-standalone/pom.xml @@ -6,7 +6,7 @@ jsf-app co.elastic.apm - 1.52.1 + 1.52.2 jsf-app-standalone diff --git a/integration-tests/jsf-app/pom.xml b/integration-tests/jsf-app/pom.xml index 7209391e4d..de76ef1152 100644 --- a/integration-tests/jsf-app/pom.xml +++ b/integration-tests/jsf-app/pom.xml @@ -6,7 +6,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 jsf-app diff --git a/integration-tests/main-app-test/pom.xml b/integration-tests/main-app-test/pom.xml index 28ae005ed4..98a0cd661d 100644 --- a/integration-tests/main-app-test/pom.xml +++ b/integration-tests/main-app-test/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 main-app-test diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 81089fa95e..a023927579 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -5,7 +5,7 @@ apm-agent-parent co.elastic.apm - 1.52.1 + 1.52.2 integration-tests diff --git a/integration-tests/quarkus/pom.xml b/integration-tests/quarkus/pom.xml index 341d1e94fd..403a1b1420 100644 --- a/integration-tests/quarkus/pom.xml +++ b/integration-tests/quarkus/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 quarkus diff --git a/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml index 5ed0201284..cf49e489e3 100644 --- a/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml +++ b/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml @@ -5,7 +5,7 @@ quarkus co.elastic.apm - 1.52.1 + 1.52.2 quarkus-jaxrs-base diff --git a/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml index 46f81207e1..ccb0e2f2d1 100644 --- a/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml +++ b/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml @@ -5,7 +5,7 @@ quarkus co.elastic.apm - 1.52.1 + 1.52.2 quarkus-jaxrs-undertow diff --git a/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml index dc9d7ec463..7c9f25a936 100644 --- a/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml +++ b/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml @@ -5,7 +5,7 @@ quarkus co.elastic.apm - 1.52.1 + 1.52.2 quarkus-jaxrs-vertx diff --git a/integration-tests/runtime-attach/pom.xml b/integration-tests/runtime-attach/pom.xml index 5319c7e9c4..349809e624 100644 --- a/integration-tests/runtime-attach/pom.xml +++ b/integration-tests/runtime-attach/pom.xml @@ -6,7 +6,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 runtime-attach diff --git a/integration-tests/runtime-attach/runtime-attach-app/pom.xml b/integration-tests/runtime-attach/runtime-attach-app/pom.xml index f0b16ccdc3..8f530a725d 100644 --- a/integration-tests/runtime-attach/runtime-attach-app/pom.xml +++ b/integration-tests/runtime-attach/runtime-attach-app/pom.xml @@ -3,7 +3,7 @@ runtime-attach co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/runtime-attach/runtime-attach-test/pom.xml b/integration-tests/runtime-attach/runtime-attach-test/pom.xml index 80066c7d52..e4626b912e 100644 --- a/integration-tests/runtime-attach/runtime-attach-test/pom.xml +++ b/integration-tests/runtime-attach/runtime-attach-test/pom.xml @@ -3,7 +3,7 @@ runtime-attach co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/simple-webapp/pom.xml b/integration-tests/simple-webapp/pom.xml index 7594138f96..dd42c31638 100644 --- a/integration-tests/simple-webapp/pom.xml +++ b/integration-tests/simple-webapp/pom.xml @@ -6,7 +6,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 simple-webapp diff --git a/integration-tests/soap-test/pom.xml b/integration-tests/soap-test/pom.xml index d7bd9d784f..9b7d97ddfd 100644 --- a/integration-tests/soap-test/pom.xml +++ b/integration-tests/soap-test/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 soap-test diff --git a/integration-tests/spring-boot-1-5/pom.xml b/integration-tests/spring-boot-1-5/pom.xml index 7e7fff8762..66e946ddf4 100644 --- a/integration-tests/spring-boot-1-5/pom.xml +++ b/integration-tests/spring-boot-1-5/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-1-5 diff --git a/integration-tests/spring-boot-2/pom.xml b/integration-tests/spring-boot-2/pom.xml index 4fa8802475..b92716c259 100644 --- a/integration-tests/spring-boot-2/pom.xml +++ b/integration-tests/spring-boot-2/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-2 diff --git a/integration-tests/spring-boot-2/spring-boot-2-base/pom.xml b/integration-tests/spring-boot-2/spring-boot-2-base/pom.xml index 074c7e45e9..5d34e44282 100644 --- a/integration-tests/spring-boot-2/spring-boot-2-base/pom.xml +++ b/integration-tests/spring-boot-2/spring-boot-2-base/pom.xml @@ -5,7 +5,7 @@ spring-boot-2 co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-2-base diff --git a/integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml b/integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml index 331f0c2e85..4161362b03 100644 --- a/integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml +++ b/integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml @@ -5,7 +5,7 @@ spring-boot-2 co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-2-jetty diff --git a/integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml b/integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml index 738ba02cda..8f42d7f580 100644 --- a/integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml +++ b/integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml @@ -5,7 +5,7 @@ spring-boot-2 co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-2-tomcat diff --git a/integration-tests/spring-boot-2/spring-boot-2-undertow/pom.xml b/integration-tests/spring-boot-2/spring-boot-2-undertow/pom.xml index 45a94d271a..4093c02663 100644 --- a/integration-tests/spring-boot-2/spring-boot-2-undertow/pom.xml +++ b/integration-tests/spring-boot-2/spring-boot-2-undertow/pom.xml @@ -5,7 +5,7 @@ spring-boot-2 co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-2-undertow diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml index a0be3b11e8..2e1dace11e 100644 --- a/integration-tests/spring-boot-3/pom.xml +++ b/integration-tests/spring-boot-3/pom.xml @@ -5,7 +5,7 @@ integration-tests co.elastic.apm - 1.52.1 + 1.52.2 spring-boot-3 @@ -30,7 +30,7 @@ org.springframework.boot spring-boot-dependencies - 3.3.4 + 3.4.1 pom import diff --git a/integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml b/integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml index f4bbd9a1df..6592a219d5 100644 --- a/integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml +++ b/integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml @@ -3,7 +3,7 @@ spring-boot-3 co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml b/integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml index 88364aced5..0c9f843a0f 100644 --- a/integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml +++ b/integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml @@ -3,7 +3,7 @@ spring-boot-3 co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/integration-tests/spring-boot-3/spring-boot-3-undertow/pom.xml b/integration-tests/spring-boot-3/spring-boot-3-undertow/pom.xml index d0f13c1522..456c3429ac 100644 --- a/integration-tests/spring-boot-3/spring-boot-3-undertow/pom.xml +++ b/integration-tests/spring-boot-3/spring-boot-3-undertow/pom.xml @@ -3,7 +3,7 @@ spring-boot-3 co.elastic.apm - 1.52.1 + 1.52.2 4.0.0 diff --git a/pom.xml b/pom.xml index 1c21a15efb..2678740da6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ co.elastic.apm apm-agent-parent - 1.52.1 + 1.52.2 pom ${project.groupId}:${project.artifactId} @@ -128,18 +128,18 @@ 1.6.0 5.0.15.RELEASE 9.4.11.v20180605 - 1.5.2 + 1.5.5 - 1.15.10 + 1.17.0 9.7.1 5.4.0 - 5.14.2 + 5.15.2 1.17 - 1.20.1 + 1.20.3 2.38.0 @@ -549,11 +549,11 @@ maven-surefire-plugin - 3.0.0-M8 + 3.5.2 maven-failsafe-plugin - 3.0.0-M8 + 3.5.2 maven-jar-plugin @@ -615,7 +615,25 @@ maven-shade-plugin - 3.3.0 + 3.6.0 + + + + org.ow2.asm + asm + ${version.asm} + + + org.ow2.asm + asm-commons + ${version.asm} + + + org.ow2.asm + asm-tree + ${version.asm} + + maven-clean-plugin @@ -754,7 +772,7 @@ org.assertj assertj-core - 3.26.3 + 3.27.2 test diff --git a/updatecli-compose.yaml b/updatecli-compose.yaml index 7225bcbd08..a25d0436f5 100644 --- a/updatecli-compose.yaml +++ b/updatecli-compose.yaml @@ -2,17 +2,17 @@ # https://www.updatecli.io/docs/core/compose/ policies: - name: Handle apm-data server specs - policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-data-spec:0.5.0@sha256:1307837d72174da906afb40a812b89f9f40efdbc0f6dcb4f632f886f9798577e + policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-data-spec:0.6.0@sha256:c0bbdec23541bed38df1342c95aeb601530a113db1ff11715c1c7616ed5e9e8b values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/apm-data-spec.yml - name: Handle apm gherkin specs - policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-gherkin:0.5.0@sha256:7166356b1bb5fb39b640dc9712a2a9f16b06b3fdb137dd362ede7d70ca5396e8 + policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-gherkin:0.6.0@sha256:dbaf4d855c5c212c3b5a8d2cc98c243a2b769ac347198ae8814393a1a0576587 values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/apm-gherkin.yml - name: Handle apm json specs - policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-json-specs:0.5.0@sha256:f4065402be6459507660cb644fffa9cdc77a58303ebd7f8f0325002e206cf6a1 + policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-json-specs:0.6.0@sha256:e5a74c159ceed02fd20515ea76fa25ff81e3ccf977e74e636f9973db86aa52a5 values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/apm-json-specs.yml @@ -21,3 +21,7 @@ policies: values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/update-compose.yml + - name: Update Updatecli version + policy: ghcr.io/elastic/oblt-updatecli-policies/updatecli/version:0.2.0@sha256:013a37ddcdb627c46e7cba6fb9d1d7bc144584fa9063843ae7ee0f6ef26b4bea + values: + - .ci/updatecli/values.d/scm.yml