From e61a8fc141c417df7f6389c0ef1f713e5004add7 Mon Sep 17 00:00:00 2001
From: apmmachine
Date: Wed, 6 Mar 2024 16:49:51 +0000
Subject: [PATCH 001/132] [maven-release-plugin] prepare for next development
iteration
---
apm-agent-api/pom.xml | 2 +-
apm-agent-attach-cli/pom.xml | 2 +-
apm-agent-attach/pom.xml | 2 +-
apm-agent-benchmarks/pom.xml | 2 +-
apm-agent-bootstrap/pom.xml | 2 +-
apm-agent-builds/apm-agent-java8/pom.xml | 2 +-
apm-agent-builds/apm-agent/pom.xml | 2 +-
apm-agent-builds/pom.xml | 2 +-
apm-agent-cached-lookup-key/pom.xml | 2 +-
apm-agent-common/pom.xml | 2 +-
apm-agent-core/pom.xml | 2 +-
apm-agent-lambda-layer/pom.xml | 2 +-
apm-agent-plugin-sdk/pom.xml | 2 +-
.../apm-apache-httpclient-common/pom.xml | 2 +-
.../apm-apache-httpclient3-plugin/pom.xml | 2 +-
.../apm-apache-httpclient4-plugin/pom.xml | 2 +-
.../apm-apache-httpclient5-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-apache-httpclient/pom.xml | 2 +-
apm-agent-plugins/apm-api-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/pom.xml | 2 +-
apm-agent-plugins/apm-awslambda-plugin/pom.xml | 2 +-
.../apm-cassandra/apm-cassandra-core-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/pom.xml | 2 +-
apm-agent-plugins/apm-dubbo-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-ecs-logging-plugin/pom.xml | 2 +-
.../apm-es-restclient-plugin-5_6/pom.xml | 2 +-
.../apm-es-restclient-plugin-6_4/pom.xml | 2 +-
.../apm-es-restclient-plugin-7_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-8_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-es-restclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grails-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/pom.xml | 2 +-
.../apm-hibernate-search-plugin-5_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-6_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-hibernate-search-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-httpclient-core/pom.xml | 2 +-
apm-agent-plugins/apm-httpserver-core/pom.xml | 2 +-
apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-concurrent-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-ldap-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-javalin-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxrs-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxws-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdbc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml | 2 +-
.../apm-jms-plugin/apm-jms-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jmx-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jsf-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-base-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-kafka-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-jboss-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-log4j1-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-log4j2-plugin/pom.xml | 2 +-
.../apm-logback-plugin/apm-logback-plugin-impl/pom.xml | 2 +-
.../apm-logback-plugin-legacy-tests/pom.xml | 2 +-
.../apm-logging-plugin/apm-logback-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-logging-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-micrometer-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-test/pom.xml | 2 +-
.../apm-opentelemetry-embedded-metrics-sdk/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-common/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-latest/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-v1_14/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-parent/pom.xml | 2 +-
.../apm-opentelemetry-metricsdk-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-test/pom.xml | 2 +-
apm-agent-plugins/apm-opentelemetry/pom.xml | 2 +-
apm-agent-plugins/apm-opentracing-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-process-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-profiling-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/pom.xml | 2 +-
apm-agent-plugins/apm-reactor-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml | 2 +-
.../apm-redis-plugin/apm-lettuce-3-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml | 2 +-
.../apm-redis-plugin/apm-redisson-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml | 2 +-
.../apm-scheduled-annotation-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-jakarta-test/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-sparkjava-plugin/pom.xml | 2 +-
.../apm-spring-restclient-test/pom.xml | 2 +-
.../apm-spring-resttemplate-plugin/pom.xml | 2 +-
.../apm-spring-resttemplate-test/pom.xml | 2 +-
apm-agent-plugins/apm-spring-resttemplate/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webclient-plugin/pom.xml | 2 +-
.../apm-spring-webflux-common-spring5/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-common/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-plugin/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-spring5/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-testapp/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webmvc/pom.xml | 2 +-
apm-agent-plugins/apm-struts-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-urlconnection-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/pom.xml | 2 +-
apm-agent-plugins/pom.xml | 2 +-
apm-agent-tracer/pom.xml | 2 +-
apm-opentracing/pom.xml | 2 +-
elastic-apm-agent-java8/pom.xml | 2 +-
elastic-apm-agent-premain/pom.xml | 2 +-
elastic-apm-agent/pom.xml | 2 +-
.../application-server-integration-tests/pom.xml | 2 +-
integration-tests/aws-lambda-test/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-dependent/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-standalone/pom.xml | 2 +-
integration-tests/cdi-app/pom.xml | 2 +-
.../cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml | 2 +-
.../cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml | 2 +-
integration-tests/cdi-jakartaee-app/pom.xml | 2 +-
.../external-plugin-otel-test-app/pom.xml | 2 +-
.../external-plugin-otel-test-plugin1/pom.xml | 2 +-
.../external-plugin-otel-test-plugin2/pom.xml | 2 +-
integration-tests/external-plugin-otel-test/pom.xml | 2 +-
.../external-plugin-test/external-plugin-app/pom.xml | 2 +-
.../external-plugin-test/external-plugin-jakarta-app/pom.xml | 2 +-
.../external-plugin-test/external-plugin/pom.xml | 2 +-
.../plugin-instrumentation-target/pom.xml | 2 +-
integration-tests/external-plugin-test/pom.xml | 2 +-
.../jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml | 2 +-
.../jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml | 2 +-
integration-tests/jakartaee-jsf-app/pom.xml | 2 +-
integration-tests/jakartaee-simple-webapp/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-dependent/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-standalone/pom.xml | 2 +-
integration-tests/jsf-app/pom.xml | 2 +-
integration-tests/main-app-test/pom.xml | 2 +-
integration-tests/pom.xml | 2 +-
integration-tests/quarkus/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-base/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml | 2 +-
integration-tests/runtime-attach/pom.xml | 2 +-
integration-tests/runtime-attach/runtime-attach-app/pom.xml | 2 +-
integration-tests/runtime-attach/runtime-attach-test/pom.xml | 2 +-
integration-tests/simple-webapp/pom.xml | 2 +-
integration-tests/soap-test/pom.xml | 2 +-
integration-tests/spring-boot-1-5/pom.xml | 2 +-
integration-tests/spring-boot-2/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-base/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml | 2 +-
.../spring-boot-2/spring-boot-2-undertow/pom.xml | 2 +-
integration-tests/spring-boot-3/pom.xml | 2 +-
integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml | 2 +-
integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml | 2 +-
.../spring-boot-3/spring-boot-3-undertow/pom.xml | 2 +-
pom.xml | 4 ++--
200 files changed, 201 insertions(+), 201 deletions(-)
diff --git a/apm-agent-api/pom.xml b/apm-agent-api/pom.xml
index f86c39bf78..dc56879084 100644
--- a/apm-agent-api/pom.xml
+++ b/apm-agent-api/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-api
diff --git a/apm-agent-attach-cli/pom.xml b/apm-agent-attach-cli/pom.xml
index 3b4027067c..49d3761542 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-attach/pom.xml b/apm-agent-attach/pom.xml
index 6ea031e268..44bb4d3407 100644
--- a/apm-agent-attach/pom.xml
+++ b/apm-agent-attach/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-attach
diff --git a/apm-agent-benchmarks/pom.xml b/apm-agent-benchmarks/pom.xml
index 53d671c7f9..05a9398e17 100644
--- a/apm-agent-benchmarks/pom.xml
+++ b/apm-agent-benchmarks/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-benchmarks
diff --git a/apm-agent-bootstrap/pom.xml b/apm-agent-bootstrap/pom.xml
index 7d213ae3b8..e2977db54c 100644
--- a/apm-agent-bootstrap/pom.xml
+++ b/apm-agent-bootstrap/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-bootstrap
diff --git a/apm-agent-builds/apm-agent-java8/pom.xml b/apm-agent-builds/apm-agent-java8/pom.xml
index bca962e66a..f7a80a7819 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.48.1
+ 1.48.2-SNAPSHOT
apm-agent-java8
diff --git a/apm-agent-builds/apm-agent/pom.xml b/apm-agent-builds/apm-agent/pom.xml
index 2c44c9feb7..03aa5bbf66 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.48.1
+ 1.48.2-SNAPSHOT
apm-agent
diff --git a/apm-agent-builds/pom.xml b/apm-agent-builds/pom.xml
index f02d688dc2..2d64440819 100644
--- a/apm-agent-builds/pom.xml
+++ b/apm-agent-builds/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-cached-lookup-key/pom.xml b/apm-agent-cached-lookup-key/pom.xml
index d5bc35061a..8f214a8b1f 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-common/pom.xml b/apm-agent-common/pom.xml
index 1b7611f1aa..e57ab1abce 100644
--- a/apm-agent-common/pom.xml
+++ b/apm-agent-common/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index afd5e43512..52c81eda23 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-core
diff --git a/apm-agent-lambda-layer/pom.xml b/apm-agent-lambda-layer/pom.xml
index 7acb09a53e..00279d5bbd 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugin-sdk/pom.xml b/apm-agent-plugin-sdk/pom.xml
index 2adaf7fd88..8373fd913b 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
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 01d85b23d1..09b244f874 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.48.1
+ 1.48.2-SNAPSHOT
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 3c9413eefb..26badce88b 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.48.1
+ 1.48.2-SNAPSHOT
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 1f8b78b0ca..e1e3d3d799 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.48.1
+ 1.48.2-SNAPSHOT
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 6780638bac..912cd34205 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.48.1
+ 1.48.2-SNAPSHOT
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 cc2a7466ab..13039a2137 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.48.1
+ 1.48.2-SNAPSHOT
apm-apache-httpclient
diff --git a/apm-agent-plugins/apm-api-plugin/pom.xml b/apm-agent-plugins/apm-api-plugin/pom.xml
index 8245bf49f8..9bbf32fc0a 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.48.1
+ 1.48.2-SNAPSHOT
diff --git a/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml b/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml
index 0817cb480e..d16146a415 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.48.1
+ 1.48.2-SNAPSHOT
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 5e65f9695d..9ce3564a88 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.48.1
+ 1.48.2-SNAPSHOT
4.0.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 4c5bd4cadd..7b3a044eb3 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
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 62ecad9a73..3d3f0de94e 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-aws-sdk/pom.xml b/apm-agent-plugins/apm-aws-sdk/pom.xml
index 9acd6ab199..5cf7a1e724 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-awslambda-plugin/pom.xml b/apm-agent-plugins/apm-awslambda-plugin/pom.xml
index 6ecc7e3cf0..2fc9a49e39 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.48.1
+ 1.48.2-SNAPSHOT
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 110cc51a59..52ada94e7e 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.48.1
+ 1.48.2-SNAPSHOT
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 245b37dda1..1c48a45f4b 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.48.1
+ 1.48.2-SNAPSHOT
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 57bb53d1cc..977e380899 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-cassandra/pom.xml b/apm-agent-plugins/apm-cassandra/pom.xml
index 3628a07846..28412125b2 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-dubbo-plugin/pom.xml b/apm-agent-plugins/apm-dubbo-plugin/pom.xml
index 4e07dff93c..8b62725169 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.48.1
+ 1.48.2-SNAPSHOT
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 d7d4191da5..f261b19bc2 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.48.1
+ 1.48.2-SNAPSHOT
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 953b7df444..aaf43fd306 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.48.1
+ 1.48.2-SNAPSHOT
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 ecebe23244..7d8b0b7284 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.48.1
+ 1.48.2-SNAPSHOT
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 1d7449dde8..9149b883fb 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.48.1
+ 1.48.2-SNAPSHOT
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 ede3c16185..997ab85f8a 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.48.1
+ 1.48.2-SNAPSHOT
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 1b9542947f..40dadf3324 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.48.1
+ 1.48.2-SNAPSHOT
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 f6f737e86e..afd404b925 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.48.1
+ 1.48.2-SNAPSHOT
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 358b698acf..959f055bcf 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.48.1
+ 1.48.2-SNAPSHOT
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 ce4941288f..dd04a58d3a 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.48.1
+ 1.48.2-SNAPSHOT
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 9633786176..1cd687415b 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.48.1
+ 1.48.2-SNAPSHOT
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 b435a854e3..49a7d51de1 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.48.1
+ 1.48.2-SNAPSHOT
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 0a15cdba35..f583d33fba 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.48.1
+ 1.48.2-SNAPSHOT
apm-grpc-test-latest
diff --git a/apm-agent-plugins/apm-grpc/pom.xml b/apm-agent-plugins/apm-grpc/pom.xml
index 297f801075..1ab7d2d4a1 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.48.1
+ 1.48.2-SNAPSHOT
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 5231eadcfa..00ad479bc5 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.48.1
+ 1.48.2-SNAPSHOT
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 f90873c3f7..af31592546 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.48.1
+ 1.48.2-SNAPSHOT
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 0bd46f79af..c6c8482f39 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.48.1
+ 1.48.2-SNAPSHOT
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 5f8b49d2a3..d0a531299d 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.48.1
+ 1.48.2-SNAPSHOT
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 df0969200c..f3030694a4 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.48.1
+ 1.48.2-SNAPSHOT
apm-httpclient-core
diff --git a/apm-agent-plugins/apm-httpserver-core/pom.xml b/apm-agent-plugins/apm-httpserver-core/pom.xml
index 2fff28b293..702736ed6e 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.48.1
+ 1.48.2-SNAPSHOT
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 06e4e69463..6630f0da94 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.48.1
+ 1.48.2-SNAPSHOT
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 b182dbd8e7..aec7d4d61e 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.48.1
+ 1.48.2-SNAPSHOT
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 96bf17a825..d69b13e8d4 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.48.1
+ 1.48.2-SNAPSHOT
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 72d3615e04..c8e4775859 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.48.1
+ 1.48.2-SNAPSHOT
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 f31c284347..26255efff9 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-jaxrs-plugin/pom.xml b/apm-agent-plugins/apm-jaxrs-plugin/pom.xml
index 9ee30678ed..15eaeb76c2 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.48.1
+ 1.48.2-SNAPSHOT
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 8356ea4a83..1466284ce5 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-jaxws-plugin/pom.xml b/apm-agent-plugins/apm-jaxws-plugin/pom.xml
index e97b1acb0b..b16e3a2782 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.48.1
+ 1.48.2-SNAPSHOT
apm-jaxws-plugin
diff --git a/apm-agent-plugins/apm-jdbc-plugin/pom.xml b/apm-agent-plugins/apm-jdbc-plugin/pom.xml
index 997d54e0e5..8d279585e3 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.48.1
+ 1.48.2-SNAPSHOT
apm-jdbc-plugin
diff --git a/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml
index cd638d2d04..a7f6523fd7 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.48.1
+ 1.48.2-SNAPSHOT
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 0aefe8f0ba..85c2823725 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.48.1
+ 1.48.2-SNAPSHOT
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 bd96256253..bbbcc1a0f0 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.48.1
+ 1.48.2-SNAPSHOT
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 9973007166..9c10e3f17c 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.48.1
+ 1.48.2-SNAPSHOT
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 e5089ad80d..b85ed7a13e 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.48.1
+ 1.48.2-SNAPSHOT
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 c427ab178b..81e1cfde8f 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.48.1
+ 1.48.2-SNAPSHOT
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 2d4e692fe1..c3c3b9d1b4 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.48.1
+ 1.48.2-SNAPSHOT
apm-jms-plugin
diff --git a/apm-agent-plugins/apm-jmx-plugin/pom.xml b/apm-agent-plugins/apm-jmx-plugin/pom.xml
index 1112c40c13..64af345431 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.48.1
+ 1.48.2-SNAPSHOT
apm-jmx-plugin
diff --git a/apm-agent-plugins/apm-jsf-plugin/pom.xml b/apm-agent-plugins/apm-jsf-plugin/pom.xml
index 7368aa8462..8556914066 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.48.1
+ 1.48.2-SNAPSHOT
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 b0f150727a..f3b6911e9d 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.48.1
+ 1.48.2-SNAPSHOT
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 cdcd4d0462..4137353472 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.48.1
+ 1.48.2-SNAPSHOT
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 82284c44a6..bfbaf17272 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-kafka-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/pom.xml
index ac7ded3a3d..85676c0666 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.48.1
+ 1.48.2-SNAPSHOT
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 e17343791c..c1e66a3766 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.48.1
+ 1.48.2-SNAPSHOT
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 2d1c5a996c..a27c6ea565 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.48.1
+ 1.48.2-SNAPSHOT
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 ca055fbf6b..afa55c335e 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.48.1
+ 1.48.2-SNAPSHOT
apm-log4j1-plugin
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 ae81294677..a64a1a0f33 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.48.1
+ 1.48.2-SNAPSHOT
apm-log4j2-plugin
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 b00ffd019e..5d31a5212d 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.48.1
+ 1.48.2-SNAPSHOT
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 cee32d6fe1..3fe9c12bee 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.48.1
+ 1.48.2-SNAPSHOT
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 07edd698d3..0c4618b9d9 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.48.1
+ 1.48.2-SNAPSHOT
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 17507eb097..f3fed7db39 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.48.1
+ 1.48.2-SNAPSHOT
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 d9b6b779ef..fe9d2ea927 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.48.1
+ 1.48.2-SNAPSHOT
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 5c6f251b4b..1f901bfd46 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.48.1
+ 1.48.2-SNAPSHOT
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 033cb42d4a..210a547700 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.48.1
+ 1.48.2-SNAPSHOT
apm-logging-plugin
diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
index 101e463b63..1bf14f7a15 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
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 c8c68661bc..2ed07d0c3c 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.48.1
+ 1.48.2-SNAPSHOT
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 f9a8903c3f..2cd12d88fa 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.48.1
+ 1.48.2-SNAPSHOT
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 09cb31f444..f79e060b0e 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.48.1
+ 1.48.2-SNAPSHOT
apm-mongodb4-plugin
diff --git a/apm-agent-plugins/apm-mongodb/pom.xml b/apm-agent-plugins/apm-mongodb/pom.xml
index ec8ee44c4e..94f6457acb 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.48.1
+ 1.48.2-SNAPSHOT
apm-mongodb
diff --git a/apm-agent-plugins/apm-okhttp-plugin/pom.xml b/apm-agent-plugins/apm-okhttp-plugin/pom.xml
index 5ee95563c0..17a140044a 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.48.1
+ 1.48.2-SNAPSHOT
apm-okhttp-plugin
diff --git a/apm-agent-plugins/apm-okhttp-test/pom.xml b/apm-agent-plugins/apm-okhttp-test/pom.xml
index 1784e3a205..370ce9b874 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.48.1
+ 1.48.2-SNAPSHOT
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 2cd72d452c..65610a16a8 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.48.1
+ 1.48.2-SNAPSHOT
apm-opentelemetry-embedded-metrics-sdk
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 bd703e7427..5f039cf1f6 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.48.1
+ 1.48.2-SNAPSHOT
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 70635e304b..1dd43e348e 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.48.1
+ 1.48.2-SNAPSHOT
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 dfd9e5b293..b2464b6b7d 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.48.1
+ 1.48.2-SNAPSHOT
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 d488231fd5..4c63b96869 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.48.1
+ 1.48.2-SNAPSHOT
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 1266170f5d..8427d641bf 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.48.1
+ 1.48.2-SNAPSHOT
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 0d34df9662..9caf40a9e7 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.48.1
+ 1.48.2-SNAPSHOT
apm-opentelemetry-plugin
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 0491af15dc..0e426ab323 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.48.1
+ 1.48.2-SNAPSHOT
${project.groupId}:${project.artifactId}
diff --git a/apm-agent-plugins/apm-opentelemetry/pom.xml b/apm-agent-plugins/apm-opentelemetry/pom.xml
index 2f16505192..a309696fcd 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.48.1
+ 1.48.2-SNAPSHOT
apm-opentelemetry
diff --git a/apm-agent-plugins/apm-opentracing-plugin/pom.xml b/apm-agent-plugins/apm-opentracing-plugin/pom.xml
index ae90005844..ae9e4bf4b0 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.48.1
+ 1.48.2-SNAPSHOT
apm-opentracing-plugin
diff --git a/apm-agent-plugins/apm-process-plugin/pom.xml b/apm-agent-plugins/apm-process-plugin/pom.xml
index 0111e938da..da684669d9 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-profiling-plugin/pom.xml b/apm-agent-plugins/apm-profiling-plugin/pom.xml
index 37e3cdc23d..8f5e912af0 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.48.1
+ 1.48.2-SNAPSHOT
apm-profiling-plugin
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 403bbf01dc..c4012b542e 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.48.1
+ 1.48.2-SNAPSHOT
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 234b339ee0..019654416e 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.48.1
+ 1.48.2-SNAPSHOT
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 3504cf38dc..1b2d22a3cc 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-quartz/pom.xml b/apm-agent-plugins/apm-quartz/pom.xml
index 816532c5b2..5bd74fe5b8 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.48.1
+ 1.48.2-SNAPSHOT
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 0b5ce43811..232a8a3c91 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.48.1
+ 1.48.2-SNAPSHOT
apm-rabbitmq-plugin
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
index 9c0cbdd2b8..d5d6476ea6 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
@@ -5,7 +5,7 @@
apm-rabbitmq
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-rabbitmq-spring
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 4bb6c21fdc..964023983e 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.48.1
+ 1.48.2-SNAPSHOT
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 26095b556a..c0f6d5606f 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.48.1
+ 1.48.2-SNAPSHOT
apm-rabbitmq-test-4
diff --git a/apm-agent-plugins/apm-rabbitmq/pom.xml b/apm-agent-plugins/apm-rabbitmq/pom.xml
index a3659d7921..84c3adf675 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.48.1
+ 1.48.2-SNAPSHOT
apm-rabbitmq
diff --git a/apm-agent-plugins/apm-reactor-plugin/pom.xml b/apm-agent-plugins/apm-reactor-plugin/pom.xml
index 111a6febac..7c33618024 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.48.1
+ 1.48.2-SNAPSHOT
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 c94d152b40..b851eba9bd 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.48.1
+ 1.48.2-SNAPSHOT
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 e8c2de4861..dffe6419d6 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.48.1
+ 1.48.2-SNAPSHOT
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 e9673307ed..e67e74953d 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.48.1
+ 1.48.2-SNAPSHOT
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 e4900c367e..8a36ca3d0b 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.48.1
+ 1.48.2-SNAPSHOT
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 f24e4bc799..3f1760fbec 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.48.1
+ 1.48.2-SNAPSHOT
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 e45daa53c3..27859df68e 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.48.1
+ 1.48.2-SNAPSHOT
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 3fde25d809..ce9a3f8dcf 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.48.1
+ 1.48.2-SNAPSHOT
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 b4812c6fda..47e44ad13e 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.48.1
+ 1.48.2-SNAPSHOT
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 46bbb3a0d6..f55fed32df 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.48.1
+ 1.48.2-SNAPSHOT
apm-redisson-plugin
diff --git a/apm-agent-plugins/apm-redis-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/pom.xml
index 2c5f5bae5f..bcc0712a47 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.48.1
+ 1.48.2-SNAPSHOT
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 49b1ec62a3..6cf99a7db4 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.48.1
+ 1.48.2-SNAPSHOT
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 6cccfbc2d9..c49411054e 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.48.1
+ 1.48.2-SNAPSHOT
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 9a84de38ed..6e4018e604 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.48.1
+ 1.48.2-SNAPSHOT
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 5f74e01506..156602f6d0 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.48.1
+ 1.48.2-SNAPSHOT
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 daad3d4005..53be86608e 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.48.1
+ 1.48.2-SNAPSHOT
apm-servlet-plugin
diff --git a/apm-agent-plugins/apm-sparkjava-plugin/pom.xml b/apm-agent-plugins/apm-sparkjava-plugin/pom.xml
index 086eaef2b7..e5d4e3a010 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.48.1
+ 1.48.2-SNAPSHOT
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 3bbe86c0b2..3f02160f34 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-restclient-test
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 4ce5b21314..8d9a70f69f 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-resttemplate-plugin
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 8feed99793..deae551502 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.48.1
+ 1.48.2-SNAPSHOT
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 7cbd13450d..94f3434b62 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.48.1
+ 1.48.2-SNAPSHOT
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 c296198695..446ebd3c83 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-webclient-plugin
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 3cb1bb3649..7fd7fca12d 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.48.1
+ 1.48.2-SNAPSHOT
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 4e09f1c9cc..b781076a72 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.48.1
+ 1.48.2-SNAPSHOT
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 594d935872..85531d1a2f 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.48.1
+ 1.48.2-SNAPSHOT
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 2bc3dc392b..30f4c298d7 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-webflux-spring5
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 885cddc043..3e45fefa40 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-webflux-testapp
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index fec6bc31c9..51265fae3c 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-webflux
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 d9b0d31e49..f42d4482df 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.48.1
+ 1.48.2-SNAPSHOT
apm-spring-webmvc-plugin
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 74b1169377..21a82e7866 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.48.1
+ 1.48.2-SNAPSHOT
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 0e0dbc1cfa..e3c4af3f60 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-struts-plugin/pom.xml b/apm-agent-plugins/apm-struts-plugin/pom.xml
index f7adb7f895..f2f1116ef2 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-urlconnection-plugin/pom.xml b/apm-agent-plugins/apm-urlconnection-plugin/pom.xml
index d741479e10..b6ef4740c4 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.48.1
+ 1.48.2-SNAPSHOT
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 a55dee0f1f..2f7905c136 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.48.1
+ 1.48.2-SNAPSHOT
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 80699ce105..f449482dea 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.48.1
+ 1.48.2-SNAPSHOT
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 b0c07fb7d3..6e07055cf6 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.48.1
+ 1.48.2-SNAPSHOT
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 93240e1ed4..be4b5e74d7 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.48.1
+ 1.48.2-SNAPSHOT
apm-vertx4-plugin
diff --git a/apm-agent-plugins/apm-vertx/pom.xml b/apm-agent-plugins/apm-vertx/pom.xml
index 52ffacae81..46fb2455c2 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.48.1
+ 1.48.2-SNAPSHOT
apm-vertx
diff --git a/apm-agent-plugins/pom.xml b/apm-agent-plugins/pom.xml
index 2643a3f595..bb2071af86 100644
--- a/apm-agent-plugins/pom.xml
+++ b/apm-agent-plugins/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-plugins
diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml
index 52ee021f60..dccd4562ed 100644
--- a/apm-agent-tracer/pom.xml
+++ b/apm-agent-tracer/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-agent-tracer
diff --git a/apm-opentracing/pom.xml b/apm-opentracing/pom.xml
index 552bd7b756..36d44a138e 100644
--- a/apm-opentracing/pom.xml
+++ b/apm-opentracing/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
apm-opentracing
diff --git a/elastic-apm-agent-java8/pom.xml b/elastic-apm-agent-java8/pom.xml
index 8f80175967..e0d262749a 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.48.1
+ 1.48.2-SNAPSHOT
elastic-apm-agent-java8
diff --git a/elastic-apm-agent-premain/pom.xml b/elastic-apm-agent-premain/pom.xml
index c9c5476159..9d87be02e9 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/elastic-apm-agent/pom.xml b/elastic-apm-agent/pom.xml
index 1d6e625611..76f7c4c2f2 100644
--- a/elastic-apm-agent/pom.xml
+++ b/elastic-apm-agent/pom.xml
@@ -5,7 +5,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.1
+ 1.48.2-SNAPSHOT
elastic-apm-agent
diff --git a/integration-tests/application-server-integration-tests/pom.xml b/integration-tests/application-server-integration-tests/pom.xml
index 821a2ab925..78f55c218a 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.48.1
+ 1.48.2-SNAPSHOT
application-server-integration-tests
diff --git a/integration-tests/aws-lambda-test/pom.xml b/integration-tests/aws-lambda-test/pom.xml
index eaafe01c06..043164b62e 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.48.1
+ 1.48.2-SNAPSHOT
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 10838ff968..645386cf40 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.48.1
+ 1.48.2-SNAPSHOT
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 3bce8646f2..77baba8340 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/integration-tests/cdi-app/pom.xml b/integration-tests/cdi-app/pom.xml
index 6d90f7280f..aec2fbfdab 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.48.1
+ 1.48.2-SNAPSHOT
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 527744cfda..de3110de16 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.48.1
+ 1.48.2-SNAPSHOT
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 40ac20e077..28d9f094cc 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/integration-tests/cdi-jakartaee-app/pom.xml b/integration-tests/cdi-jakartaee-app/pom.xml
index cfa65f2e72..f0dfb87676 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.48.1
+ 1.48.2-SNAPSHOT
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 47fde11ba3..d4148f8389 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.48.1
+ 1.48.2-SNAPSHOT
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 15b5daa0ee..51304363e2 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.48.1
+ 1.48.2-SNAPSHOT
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 74fc5c585c..2327dd561c 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.48.1
+ 1.48.2-SNAPSHOT
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 06f4084f52..8c8101f4bf 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.48.1
+ 1.48.2-SNAPSHOT
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 ee288ab1f4..2eaf4b7011 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.48.1
+ 1.48.2-SNAPSHOT
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 376b0fda26..32e9230a95 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.48.1
+ 1.48.2-SNAPSHOT
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 455233737c..842800861e 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.48.1
+ 1.48.2-SNAPSHOT
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 9963bb9464..37a8fe6849 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.48.1
+ 1.48.2-SNAPSHOT
plugin-instrumentation-target
diff --git a/integration-tests/external-plugin-test/pom.xml b/integration-tests/external-plugin-test/pom.xml
index 9bfb8a0a39..6e897b3663 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.48.1
+ 1.48.2-SNAPSHOT
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 091241e9a1..4a69451d2a 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.48.1
+ 1.48.2-SNAPSHOT
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 068e92b87d..8a390f932c 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/integration-tests/jakartaee-jsf-app/pom.xml b/integration-tests/jakartaee-jsf-app/pom.xml
index 420d5d44ec..0b0938d089 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
pom
diff --git a/integration-tests/jakartaee-simple-webapp/pom.xml b/integration-tests/jakartaee-simple-webapp/pom.xml
index 29dbd0c91c..73d8836596 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.48.1
+ 1.48.2-SNAPSHOT
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 07b6525d8b..0e97912243 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.48.1
+ 1.48.2-SNAPSHOT
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 82358a7655..5992155203 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.48.1
+ 1.48.2-SNAPSHOT
jsf-app-standalone
diff --git a/integration-tests/jsf-app/pom.xml b/integration-tests/jsf-app/pom.xml
index 15bf87c569..e2fc080321 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.48.1
+ 1.48.2-SNAPSHOT
jsf-app
diff --git a/integration-tests/main-app-test/pom.xml b/integration-tests/main-app-test/pom.xml
index cfd0d1cc1c..7aba42e2a1 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.48.1
+ 1.48.2-SNAPSHOT
main-app-test
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index e1e668fb04..c6800d5577 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
integration-tests
diff --git a/integration-tests/quarkus/pom.xml b/integration-tests/quarkus/pom.xml
index 5155f0a7c1..5d099e3f07 100644
--- a/integration-tests/quarkus/pom.xml
+++ b/integration-tests/quarkus/pom.xml
@@ -5,7 +5,7 @@
integration-tests
co.elastic.apm
- 1.48.1
+ 1.48.2-SNAPSHOT
quarkus
diff --git a/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml
index 0844fd2315..19d6d81b24 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.48.1
+ 1.48.2-SNAPSHOT
quarkus-jaxrs-base
diff --git a/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml
index 9579589899..1075b45659 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.48.1
+ 1.48.2-SNAPSHOT
quarkus-jaxrs-undertow
diff --git a/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml
index 63b1078af0..fdb198f7ea 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.48.1
+ 1.48.2-SNAPSHOT
quarkus-jaxrs-vertx
diff --git a/integration-tests/runtime-attach/pom.xml b/integration-tests/runtime-attach/pom.xml
index c2f384da95..c6d07b45eb 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.48.1
+ 1.48.2-SNAPSHOT
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 3d4e1ba2c9..67442e2407 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.48.1
+ 1.48.2-SNAPSHOT
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 7a8335522a..203e031971 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/integration-tests/simple-webapp/pom.xml b/integration-tests/simple-webapp/pom.xml
index c6fda1e5a5..b08f6fec40 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.48.1
+ 1.48.2-SNAPSHOT
simple-webapp
diff --git a/integration-tests/soap-test/pom.xml b/integration-tests/soap-test/pom.xml
index ee7878bdf5..1ebad4536e 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.48.1
+ 1.48.2-SNAPSHOT
soap-test
diff --git a/integration-tests/spring-boot-1-5/pom.xml b/integration-tests/spring-boot-1-5/pom.xml
index f2e60f25b2..a27b24fd16 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.48.1
+ 1.48.2-SNAPSHOT
spring-boot-1-5
diff --git a/integration-tests/spring-boot-2/pom.xml b/integration-tests/spring-boot-2/pom.xml
index f6b797ae08..6e834687b2 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.48.1
+ 1.48.2-SNAPSHOT
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 8571f30a4b..528160db9b 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.48.1
+ 1.48.2-SNAPSHOT
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 e5033ba0e8..9f07748eef 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.48.1
+ 1.48.2-SNAPSHOT
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 3373ee2fb1..4eacadb320 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.48.1
+ 1.48.2-SNAPSHOT
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 5ee5340308..3c7212ec18 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.48.1
+ 1.48.2-SNAPSHOT
spring-boot-2-undertow
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index 4dea8a7b02..174007e9fe 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.48.1
+ 1.48.2-SNAPSHOT
spring-boot-3
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 3ff81f77dd..4d63b45954 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.48.1
+ 1.48.2-SNAPSHOT
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 e0fc0192e5..75cf0f4adc 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.48.1
+ 1.48.2-SNAPSHOT
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 4ba6db6657..1633a3aeb5 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.48.1
+ 1.48.2-SNAPSHOT
4.0.0
diff --git a/pom.xml b/pom.xml
index 38d8bcf393..0e376b96b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.1
+ 1.48.2-SNAPSHOT
pom
${project.groupId}:${project.artifactId}
@@ -30,7 +30,7 @@
scm:git:git@github.com:elastic/apm-agent-java.git
scm:git:git@github.com:elastic/apm-agent-java.git
https://github.com/elastic/apm-agent-java
- v1.48.1
+ HEAD
From c7f7f2c593c6b64aa57972217e238f20e3fd0f92 Mon Sep 17 00:00:00 2001
From: apmmachine
Date: Wed, 6 Mar 2024 17:17:44 +0000
Subject: [PATCH 002/132] Update cloudfoundry for 1.48.1 release
---
cloudfoundry/index.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/cloudfoundry/index.yml b/cloudfoundry/index.yml
index 750c4919ab..24b766a778 100644
--- a/cloudfoundry/index.yml
+++ b/cloudfoundry/index.yml
@@ -60,3 +60,4 @@
1.47.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.47.0/elastic-apm-agent-1.47.0.jar
1.47.1: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.47.1/elastic-apm-agent-1.47.1.jar
1.48.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.48.0/elastic-apm-agent-1.48.0.jar
+1.48.1: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.48.1/elastic-apm-agent-1.48.1.jar
From 72a74e5eae9815f9d96a49cee697c5b7fe43fd20 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Mon, 11 Mar 2024 09:43:43 +0100
Subject: [PATCH 003/132] ci: use .java-version and prepare to use VM with
installed tools in BK (#3554)
---
.buildkite/hooks/prepare-common.sh | 28 +++++----
.buildkite/release.yml | 4 +-
.buildkite/snapshot.yml | 4 +-
.ci/release.sh | 13 +++-
.ci/snapshot.sh | 15 +++--
.github/workflows/main.yml | 2 +-
.github/workflows/maven-goal-jdk/action.yml | 44 ++++++++++++++
.github/workflows/maven-goal/action.yml | 22 +------
.github/workflows/release.yml | 67 +++++++++++----------
.java-version | 1 +
10 files changed, 126 insertions(+), 74 deletions(-)
create mode 100644 .github/workflows/maven-goal-jdk/action.yml
create mode 100644 .java-version
diff --git a/.buildkite/hooks/prepare-common.sh b/.buildkite/hooks/prepare-common.sh
index 68cf0d4ad4..50b3d3388e 100644
--- a/.buildkite/hooks/prepare-common.sh
+++ b/.buildkite/hooks/prepare-common.sh
@@ -1,17 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
-echo "--- Install JDK17 :java:"
-# JDK version is defined in two different locations, here and .github/workflows/maven-goal/action.yml
-JAVA_URL=https://jvm-catalog.elastic.co/jdk
-JAVA_HOME=$(pwd)/.openjdk17
-JAVA_PKG="$JAVA_URL/latest_openjdk_17_linux.tar.gz"
-curl -L --output /tmp/jdk.tar.gz "$JAVA_PKG"
-mkdir -p "$JAVA_HOME"
-tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
-
+# Configure the java version
+JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
+JAVA_HOME="${HOME}/.java/openjdk${JAVA_VERSION}"
export JAVA_HOME
-PATH=$JAVA_HOME/bin:$PATH
+PATH="${JAVA_HOME}/bin:$PATH"
export PATH
-java -version || true
+# Fallback to install at runtime
+if [ ! -d "${JAVA_HOME}" ] ; then
+ # This should not be the case normally untless the .java-version file has been changed
+ # and the VM Image is not yet available with the latest version.
+ echo "--- Install JDK${JAVA_VERSION} :java:"
+ JAVA_URL=https://jvm-catalog.elastic.co/jdk
+ JAVA_PKG="${JAVA_URL}/latest_openjdk_${JAVA_VERSION}_linux.tar.gz"
+ curl -L --output /tmp/jdk.tar.gz "$JAVA_PKG"
+ mkdir -p "$JAVA_HOME"
+ tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
+fi
+
+java -version
diff --git a/.buildkite/release.yml b/.buildkite/release.yml
index 1b6a41fae7..b646bf3309 100644
--- a/.buildkite/release.yml
+++ b/.buildkite/release.yml
@@ -1,5 +1,6 @@
agents:
provider: "gcp"
+ #image: "family/apm-agent-java-ubuntu-2204"
steps:
- label: "Run the release"
@@ -11,4 +12,5 @@ steps:
notify:
- slack: "#apm-agent-java"
- if: 'build.state != "passed"'
+ # skip slack messages if no failures and dry-run mode
+ if: 'build.state != "passed" && build.env("dry_run") == "false"'
diff --git a/.buildkite/snapshot.yml b/.buildkite/snapshot.yml
index c33406f9f4..6421fad588 100644
--- a/.buildkite/snapshot.yml
+++ b/.buildkite/snapshot.yml
@@ -1,5 +1,6 @@
agents:
provider: "gcp"
+ #image: "family/apm-agent-java-ubuntu-2204"
steps:
- label: "Run the snapshot"
@@ -11,4 +12,5 @@ steps:
notify:
- slack: "#apm-agent-java"
- if: 'build.state != "passed"'
+ # skip slack messages if no failures and dry-run mode
+ if: 'build.state != "passed" && build.env("dry_run") == "false"'
diff --git a/.ci/release.sh b/.ci/release.sh
index 77a418d863..b05947ce95 100755
--- a/.ci/release.sh
+++ b/.ci/release.sh
@@ -21,5 +21,14 @@ echo $PATH
java -version
set +x
-echo "--- Deploy the release :package:"
-./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee release.txt
+# Default in dry-run mode
+GOAL="install"
+DRY_RUN_MSG="(dry-run)"
+# Otherwise, a RELEASE
+if [[ "$dry_run" == "false" ]] ; then
+ GOAL="deploy"
+ DRY_RUN_MSG=""
+fi
+
+echo "--- Deploy the release :package: [./mvnw $GOAL)] $DRY_RUN_MSG"
+./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee release.txt
diff --git a/.ci/snapshot.sh b/.ci/snapshot.sh
index 63ec170778..a11cd4eb9a 100755
--- a/.ci/snapshot.sh
+++ b/.ci/snapshot.sh
@@ -23,9 +23,14 @@ echo $PATH
java -version
set +x
-echo "--- Deploy the snapshot :package:"
-if [[ "$dry_run" == "true" ]] ; then
- echo './mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode'
-else
- ./mvnw -V -s .ci/settings.xml -Pgpg clean deploy -DskipTests --batch-mode | tee snapshot.txt
+# Default in dry-run mode
+GOAL="install"
+DRY_RUN_MSG="(dry-run)"
+# Otherwise, a snapshot
+if [[ "$dry_run" == "false" ]] ; then
+ GOAL="deploy"
+ DRY_RUN_MSG=""
fi
+
+echo "--- Deploy the snapshot :package: [./mvnw $GOAL)] $DRY_RUN_MSG"
+./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee snapshot.txt
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0e31fd70f5..419c369cd3 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -305,7 +305,7 @@ jobs:
distribution: 'temurin'
steps:
- uses: actions/checkout@v4
- - uses: ./.github/workflows/maven-goal
+ - uses: ./.github/workflows/maven-goal-jdk
with:
test-java-version: ${{ matrix.version }}
test-java-distribution: ${{ matrix.distribution }}
diff --git a/.github/workflows/maven-goal-jdk/action.yml b/.github/workflows/maven-goal-jdk/action.yml
new file mode 100644
index 0000000000..43379e2fcf
--- /dev/null
+++ b/.github/workflows/maven-goal-jdk/action.yml
@@ -0,0 +1,44 @@
+---
+
+name: common build tasks
+description: Install specific JDK and run a command
+
+inputs:
+ test-java-version:
+ description: 'Testing Java version'
+ required: true
+ default: '17'
+ test-java-distribution:
+ description: 'Testing Java distribution'
+ required: true
+ default: 'temurin'
+ command:
+ description: 'Command to execute'
+ required: true
+ shell:
+ description: 'Default shell'
+ default: 'bash'
+ required: false
+
+runs:
+ using: "composite"
+ steps:
+ - name: Set up testing JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ inputs.test-java-version}}
+ distribution: ${{ inputs.test-java-distribution}}
+
+ - name: Set up TEST_JAVA_BINARY environment variable
+ shell: bash
+ run: |
+ major_version="$(echo '${{ inputs.test-java-version }}' | sed 's/\([0-9]*\).*/\1/')"
+ java_home_var=JAVA_HOME_${major_version}_${{ runner.arch }}
+ echo "TEST_JAVA_BINARY=${!java_home_var}/bin/java" >> $GITHUB_ENV
+
+ - uses: ./.github/workflows/maven-goal
+ with:
+ command: ${{ inputs.command }}
+ shell: ${{ inputs.shell }}
+ env:
+ TEST_JAVA_BINARY: ${{ env.TEST_JAVA_BINARY }}
diff --git a/.github/workflows/maven-goal/action.yml b/.github/workflows/maven-goal/action.yml
index a2ddbea62b..371934f3a4 100644
--- a/.github/workflows/maven-goal/action.yml
+++ b/.github/workflows/maven-goal/action.yml
@@ -4,14 +4,6 @@ name: common build tasks
description: Install specific JDK and run a command
inputs:
- test-java-version:
- description: 'Testing Java version'
- required: true
- default: '17'
- test-java-distribution:
- description: 'Testing Java distribution'
- required: true
- default: 'temurin'
command:
description: 'Command to execute'
required: true
@@ -23,23 +15,11 @@ inputs:
runs:
using: "composite"
steps:
- - name: Set up testing JDK
- if: ${{ inputs.test-java-version != '17' }}
- uses: actions/setup-java@v4
- with:
- java-version: ${{ inputs.test-java-version}}
- distribution: ${{ inputs.test-java-distribution}}
- name: Set up build JDK
uses: actions/setup-java@v4
with:
- java-version: 17 # NOTE: This version is also defined in .buildkite/hooks/pre-command
+ java-version-file: .java-version
distribution: temurin
cache: 'maven'
- - name: Set up TEST_JAVA_BINARY environment variable
- shell: bash
- run: |
- major_version="$(echo '${{ inputs.test-java-version }}' | sed 's/\([0-9]*\).*/\1/')"
- java_home_var=JAVA_HOME_${major_version}_${{ runner.arch }}
- echo "TEST_JAVA_BINARY=${!java_home_var}/bin/java" >> $GITHUB_ENV
- run: ${{ inputs.command }}
shell: ${{ inputs.shell }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 04915c1910..d15ea5f5bc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -34,10 +34,12 @@ on:
type: boolean
required: true
default: false
+ dry_run:
+ description: If set, run a dry-run release
+ default: false
+ type: boolean
env:
- JAVA_VERSION: 17
- JAVA_DIST: temurin
TAG_NAME: v${{ inputs.version }}
permissions:
@@ -68,21 +70,21 @@ jobs:
with:
ref: ${{ inputs.branch }}
token: ${{ env.GITHUB_TOKEN }}
- - name: Set up JDK ${{ env.JAVA_VERSION }}
- uses: actions/setup-java@v4
+ - name: Install JDK and mvn clean
+ uses: ./.github/workflows/maven-goal
with:
- java-version: ${{ env.JAVA_VERSION }}
- distribution: ${{ env.JAVA_DIST }}
- cache: 'maven'
+ command: ./mvnw clean
- name: Prepare changelog for release
- if: ${{ inputs.update_changelog }}
+ if: ${{ inputs.update_changelog && ! inputs.dry_run }}
run: |
java .ci/ReleaseChangelog.java CHANGELOG.asciidoc ${{ inputs.version }}
git commit -m "Prepare changelog for release ${{ inputs.version }}" CHANGELOG.asciidoc
- name: Bump version and add git tag
+ if: ${{ ! inputs.dry_run }}
run: ./mvnw release:prepare -B -DpushChanges=false "-Darguments=-DskipTests -Dmaven.javadoc.skip=true" -DreleaseVersion=${{ inputs.version }}
- - run: git push --atomic origin ${{ inputs.branch }} ${{ env.TAG_NAME }}
-
+ - name: Push changes
+ if: ${{ ! inputs.dry_run }}
+ run: git push --atomic origin ${{ inputs.branch }} ${{ env.TAG_NAME }}
maven_central_deploy:
name: "Deploy to Maven Central (Buildkite)"
@@ -103,12 +105,8 @@ jobs:
pipelineCommit: ${{ env.TAG_NAME }}
waitFor: true
printBuildLogs: false
- # The action fails with .github/actions/buildkite/run.sh: line 24: 3: parameter missing.
- # Which is an unexpected bug.
- # Adding a random buildEnvVar to circumvent the behaviour.
buildEnvVars: |
- something_something=true
-
+ dry_run=${{ inputs.dry_run || 'false' }}
await_artifact_on_maven_central:
name: "Wait for artifacts to be available on maven central"
@@ -116,6 +114,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Await artifacts published in maven central
+ if: ${{ ! inputs.dry_run }}
shell: bash
timeout-minutes: 120
run: |
@@ -147,8 +146,11 @@ jobs:
with:
ref: ${{ env.TAG_NAME }}
token: ${{ env.GITHUB_TOKEN }}
- - run: .ci/release/update_major_branch.sh ${{ inputs.version }}
- - run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')"
+ - name: Update major branch
+ run: .ci/release/update_major_branch.sh ${{ inputs.version }}
+ - name: Push changes
+ if: ${{ ! inputs.dry_run }}
+ run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')"
update_cloudfoundry:
name: "Update Cloudfoundry"
@@ -175,8 +177,9 @@ jobs:
- name: "Update Cloudfoundry index.yml file"
shell: bash
run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }}
- - run: git push origin ${{ inputs.branch }}
-
+ - name: Push changes
+ if: ${{ ! inputs.dry_run }}
+ run: git push origin ${{ inputs.branch }}
build_and_push_docker_images:
name: "Build and push docker images"
@@ -199,9 +202,11 @@ jobs:
secretId: ${{ secrets.VAULT_SECRET_ID }}
- name: "Build docker image"
shell: bash
- run: |
- ./scripts/docker-release/build_docker.sh
- ./scripts/docker-release/push_docker.sh
+ run: ./scripts/docker-release/build_docker.sh
+ - name: "Push docker image"
+ if: ${{ ! inputs.dry_run }}
+ shell: bash
+ run: ./scripts/docker-release/push_docker.sh
publish_aws_lambda:
name: "Publish AWS Lambda"
@@ -218,14 +223,10 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ env.TAG_NAME }}
- - name: Set up JDK ${{ env.JAVA_VERSION }}
- uses: actions/setup-java@v4
- with:
- java-version: ${{ env.JAVA_VERSION }}
- distribution: ${{ env.JAVA_DIST }}
- cache: 'maven'
- name: Build Lambda-layer zip using agent from maven-central
- run: ./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer
+ uses: ./.github/workflows/maven-goal
+ with:
+ command: ./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer
- uses: hashicorp/vault-action@v3.0.0
with:
url: ${{ secrets.VAULT_ADDR }}
@@ -236,6 +237,7 @@ jobs:
secret/observability-team/ci/service-account/apm-aws-lambda access_key_id | AWS_ACCESS_KEY_ID ;
secret/observability-team/ci/service-account/apm-aws-lambda secret_access_key | AWS_SECRET_ACCESS_KEY
- name: Publish
+ if: ${{ ! inputs.dry_run }}
run: |
# Convert v1.2.3 to ver-1-2-3
VERSION=${TAG_NAME/v/ver-}
@@ -243,23 +245,25 @@ jobs:
ELASTIC_LAYER_NAME="elastic-apm-java-${VERSION}" .ci/publish-aws.sh
- uses: actions/upload-artifact@v4
+ if: ${{ ! inputs.dry_run }}
with:
name: arn-file
path: .ci/.arn-file.md
- name: Add ARN file to output
+ if: ${{ ! inputs.dry_run }}
id: arn_output
run: |
echo 'arn_content<> $GITHUB_OUTPUT
cat .ci/.arn-file.md >> $GITHUB_OUTPUT
echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT
-
create_github_release:
name: "Create GitHub Release"
needs:
- publish_aws_lambda
- update_major_branch
runs-on: ubuntu-latest
+ if: ${{ ! inputs.dry_run }}
permissions:
contents: write
steps:
@@ -286,10 +290,9 @@ jobs:
--title="Release ${{ inputs.version }}" \
--notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }})
${{ needs.publish_aws_lambda.outputs.arn_content }}"
-
notify:
- if: always()
+ if: ${{ always() && ! inputs.dry_run }}
needs:
- prepare_release
- maven_central_deploy
diff --git a/.java-version b/.java-version
new file mode 100644
index 0000000000..8e2afd3427
--- /dev/null
+++ b/.java-version
@@ -0,0 +1 @@
+17
\ No newline at end of file
From 6d111e83cdbd10067cf0d1b87a596fa313e48f0e Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Mon, 11 Mar 2024 15:29:08 +0100
Subject: [PATCH 004/132] ci(bk): use specialised VMs (#3555)
---
.buildkite/README.md | 16 ++++++++++++++--
.buildkite/hooks/prepare-common.sh | 16 ++++++++++------
.buildkite/release.yml | 2 +-
.buildkite/snapshot.yml | 2 +-
4 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/.buildkite/README.md b/.buildkite/README.md
index 0a13f51042..409c434e41 100644
--- a/.buildkite/README.md
+++ b/.buildkite/README.md
@@ -9,7 +9,7 @@ This is the Buildkite pipeline for releasing the APM Agent Java.
### Pipeline Configuration
To view the pipeline and its configuration, click [here](https://buildkite.com/elastic/apm-agent-java-release) or
-go to the definition in the `elastic/ci` repository.
+go to the definition in `release.yml`.
### Credentials
@@ -25,7 +25,7 @@ This is the Buildkite pipeline for the APM Agent Java in charge of the snapshots
### Pipeline Configuration
To view the pipeline and its configuration, click [here](https://buildkite.com/elastic/apm-agent-java-snapshot) or
-go to the definition in the `elastic/ci` repository.
+go to the definition in `snapshot.yml`.
## opentelemetry-benchmark pipeline
@@ -35,3 +35,15 @@ This is the Buildkite pipeline for the Opentelemetry Benchmark.
To view the pipeline and its configuration, click [here](https://buildkite.com/elastic/apm-agent-java-opentelemetry-benchmark) or
go to the definition in `opentelemetry-benchmark.yml`.
+
+## Buildkite VM runners
+
+A set of Buildkite VM runners has been created for this repository. The VM runners contain
+the required software:
+* JDK
+* GPG
+* Maven dependencies
+
+If a new version of Java is required, update the `.java-version` file with the latest major. When the changes are merged onto `main,` wait for the following day; that's when the automation will be responsible for recreating the VM with the new Java version.
+
+If you would like to know more about how it works, please go to https://github.com/elastic/ci-agent-images/tree/main/vm-images/apm-agent-java (**NOTE**: only available for Elastic employees)
diff --git a/.buildkite/hooks/prepare-common.sh b/.buildkite/hooks/prepare-common.sh
index 50b3d3388e..f5fc876099 100644
--- a/.buildkite/hooks/prepare-common.sh
+++ b/.buildkite/hooks/prepare-common.sh
@@ -5,19 +5,23 @@ set -euo pipefail
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
JAVA_HOME="${HOME}/.java/openjdk${JAVA_VERSION}"
export JAVA_HOME
-PATH="${JAVA_HOME}/bin:$PATH"
+PATH="${JAVA_HOME}/bin:${PATH}"
export PATH
-# Fallback to install at runtime
-if [ ! -d "${JAVA_HOME}" ] ; then
+if [ -d "${JAVA_HOME}" ] ; then
+ echo "--- Skip installing JDK${JAVA_VERSION} :java:"
+ echo "already available in the Buildkite runner"
+else
+ # Fallback to install at runtime
# This should not be the case normally untless the .java-version file has been changed
# and the VM Image is not yet available with the latest version.
echo "--- Install JDK${JAVA_VERSION} :java:"
JAVA_URL=https://jvm-catalog.elastic.co/jdk
JAVA_PKG="${JAVA_URL}/latest_openjdk_${JAVA_VERSION}_linux.tar.gz"
- curl -L --output /tmp/jdk.tar.gz "$JAVA_PKG"
- mkdir -p "$JAVA_HOME"
- tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1
+ curl -L --output /tmp/jdk.tar.gz "${JAVA_PKG}"
+ mkdir -p "${JAVA_HOME}"
+ tar --extract --file /tmp/jdk.tar.gz --directory "${JAVA_HOME}" --strip-components 1
fi
+# Validate java is available in the runner.
java -version
diff --git a/.buildkite/release.yml b/.buildkite/release.yml
index b646bf3309..347f35358e 100644
--- a/.buildkite/release.yml
+++ b/.buildkite/release.yml
@@ -1,6 +1,6 @@
agents:
provider: "gcp"
- #image: "family/apm-agent-java-ubuntu-2204"
+ image: "family/apm-agent-java-ubuntu-2204"
steps:
- label: "Run the release"
diff --git a/.buildkite/snapshot.yml b/.buildkite/snapshot.yml
index 6421fad588..c5cf1bcb79 100644
--- a/.buildkite/snapshot.yml
+++ b/.buildkite/snapshot.yml
@@ -1,6 +1,6 @@
agents:
provider: "gcp"
- #image: "family/apm-agent-java-ubuntu-2204"
+ image: "family/apm-agent-java-ubuntu-2204"
steps:
- label: "Run the snapshot"
From 9a97f788b1e45b3d5afacaf5d5d03d5518d941f4 Mon Sep 17 00:00:00 2001
From: Som <111349830+someshwaranM@users.noreply.github.com>
Date: Mon, 11 Mar 2024 20:20:39 +0530
Subject: [PATCH 005/132] Added a note on centralized agent config support for
AWS Lambda (#3498)
---
docs/setup-aws-lambda.asciidoc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/setup-aws-lambda.asciidoc b/docs/setup-aws-lambda.asciidoc
index 632cee9119..2149c2d534 100644
--- a/docs/setup-aws-lambda.asciidoc
+++ b/docs/setup-aws-lambda.asciidoc
@@ -4,6 +4,10 @@
The Java APM Agent can be used with AWS Lambda to monitor the execution of your AWS Lambda functions.
+```
+Note: The Centralized Agent Configuration on the Elasticsearch APM currently does NOT support AWS Lambda.
+```
+
[float]
[[aws-lambda-java-quick-start]]
=== Quick Start
From cb509840861471a44c9d7b7203ca6c7b53adba50 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 11 Mar 2024 15:51:46 +0100
Subject: [PATCH 006/132] Bump com.networknt:json-schema-validator from 1.1.0
to 1.3.3 (#3547)
* Bump com.networknt:json-schema-validator from 1.1.0 to 1.3.3
Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.1.0 to 1.3.3.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.1.0...1.3.3)
---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* Fix compilation
* Fix schema version
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonas Kunz
---
.../src/test/java/co/elastic/apm/agent/MockReporter.java | 3 ++-
pom.xml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java
index 1d927c4dce..6fe269b495 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/MockReporter.java
@@ -40,6 +40,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.networknt.schema.JsonSchema;
import com.networknt.schema.JsonSchemaFactory;
+import com.networknt.schema.SpecVersion;
import com.networknt.schema.ValidationMessage;
import org.awaitility.core.ThrowingRunnable;
import org.stagemonitor.configuration.ConfigurationRegistry;
@@ -810,7 +811,7 @@ private enum SchemaInstance {
private static JsonSchema getSchema(String resource) {
InputStream input = Objects.requireNonNull(MockReporter.class.getResourceAsStream(resource), "missing resource " + resource);
- return JsonSchemaFactory.getInstance().getSchema(input);
+ return JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V4).getSchema(input);
}
}
diff --git a/pom.xml b/pom.xml
index 0e376b96b8..55daeaac73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,7 +129,7 @@
1.5.0
5.0.15.RELEASE
9.4.11.v20180605
- 1.1.0
+ 1.3.3
1.14.12
9.6
From 6d4b20e6c4f2cf71a2fe5d928ed08d57448530c3 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Mon, 11 Mar 2024 17:41:44 +0100
Subject: [PATCH 007/132] Fix inheritance for API annotations (#3551)
---
CHANGELOG.asciidoc | 4 +
.../AnnotationValueOffsetMappingFactory.java | 63 ++++++++---
.../apm/api/AnnotationInheritanceTest.java | 105 +++++++++++++++---
3 files changed, 138 insertions(+), 34 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index a63d81080c..96e2ec1b21 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
+[float]
+===== Bug fixes
+* Fixed problems with public API annotation inheritance - {pull}3551[#3551]
+
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/bytebuddy/AnnotationValueOffsetMappingFactory.java b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/bytebuddy/AnnotationValueOffsetMappingFactory.java
index 98e1d433c8..de58b9602b 100644
--- a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/bytebuddy/AnnotationValueOffsetMappingFactory.java
+++ b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/bytebuddy/AnnotationValueOffsetMappingFactory.java
@@ -22,6 +22,7 @@
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.annotation.AnnotationDescription;
+import net.bytebuddy.description.annotation.AnnotationValue;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.method.ParameterDescription;
import net.bytebuddy.description.type.TypeDescription;
@@ -32,6 +33,11 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.util.ArrayDeque;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Queue;
+import java.util.Set;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -58,20 +64,31 @@ public Target resolve(TypeDescription instrumentedType, MethodDescription instru
@Nullable
private Object getAnnotationValue(MethodDescription instrumentedMethod, AnnotationValueExtractor annotationValueExtractor) {
- MethodDescription methodDescription = instrumentedMethod;
- do {
- for (TypeDescription typeDescription : methodDescription.getDeclaredAnnotations().asTypeList()) {
- if (named(annotationValueExtractor.annotationClassName()).matches(typeDescription)) {
- for (MethodDescription.InDefinedShape annotationMethod : typeDescription.getDeclaredMethods()) {
- if (annotationMethod.getName().equals(annotationValueExtractor.method())) {
- return methodDescription.getDeclaredAnnotations().ofType(typeDescription).getValue(annotationMethod).resolve();
- }
+ Queue typesToCheck = new ArrayDeque<>();
+ typesToCheck.add(instrumentedMethod.getDeclaringType().asErasure());
+ Set alreadyCheckedTypes = Collections.newSetFromMap(new IdentityHashMap());
+
+ while (!typesToCheck.isEmpty()) {
+ TypeDescription type = typesToCheck.poll();
+ if (alreadyCheckedTypes.add(type)) {
+ MethodDescription method = findMethodWithSameSignature(type, instrumentedMethod);
+ if (method != null) {
+ AnnotationValue, ?> value = findValueOnMethod(method, annotationValueExtractor);
+ if (value != null) {
+ return value.resolve();
}
}
+
+ TypeDescription.Generic superClass = type.getSuperClass();
+ if (superClass != null) {
+ typesToCheck.add(superClass.asErasure());
+ }
+ for (TypeDescription.Generic interfaceType : type.getInterfaces()) {
+ typesToCheck.add(interfaceType.asErasure());
+ }
}
+ }
- methodDescription = findInstrumentedMethodInSuperClass(methodDescription.getDeclaringType().getSuperClass(), instrumentedMethod);
- } while (methodDescription != null);
Class extends DefaultValueProvider> defaultValueProvider = annotationValueExtractor.defaultValueProvider();
try {
return defaultValueProvider.getDeclaredConstructor().newInstance().getDefaultValue();
@@ -89,12 +106,8 @@ private Object getAnnotationValue(MethodDescription instrumentedMethod, Annotati
}
@Nullable
- private MethodDescription findInstrumentedMethodInSuperClass(@Nullable TypeDescription.Generic superClass, MethodDescription instrumentedMethod) {
- if (superClass == null) {
- return null;
-
- }
- for (MethodDescription declaredMethod : superClass.getDeclaredMethods()) {
+ private MethodDescription findMethodWithSameSignature(TypeDescription declaringType, MethodDescription instrumentedMethod) {
+ for (MethodDescription declaredMethod : declaringType.getDeclaredMethods()) {
if (instrumentedMethod.getInternalName().equals(declaredMethod.getInternalName())
&& instrumentedMethod.getParameters().asTypeList().asErasures().equals(declaredMethod.getParameters().asTypeList().asErasures())) {
return declaredMethod;
@@ -103,6 +116,21 @@ private MethodDescription findInstrumentedMethodInSuperClass(@Nullable TypeDescr
return null;
}
+ @Nullable
+ private static AnnotationValue, ?> findValueOnMethod(MethodDescription method, AnnotationValueExtractor valueExtractor) {
+ for (TypeDescription typeDescription : method.getDeclaredAnnotations().asTypeList()) {
+ if (named(valueExtractor.annotationClassName()).matches(typeDescription)) {
+ for (MethodDescription.InDefinedShape annotationMethod : typeDescription.getDeclaredMethods()) {
+ if (annotationMethod.getName().equals(valueExtractor.method())) {
+ return method.getDeclaredAnnotations().ofType(typeDescription).getValue(annotationMethod);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
public @interface AnnotationValueExtractor {
@@ -114,7 +142,8 @@ private MethodDescription findInstrumentedMethodInSuperClass(@Nullable TypeDescr
}
public interface DefaultValueProvider {
- @Nullable Object getDefaultValue();
+ @Nullable
+ Object getDefaultValue();
}
public static class NullDefaultValueProvider implements DefaultValueProvider {
diff --git a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/AnnotationInheritanceTest.java b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/AnnotationInheritanceTest.java
index 902fea1c74..3ad2468ab7 100644
--- a/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/AnnotationInheritanceTest.java
+++ b/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/AnnotationInheritanceTest.java
@@ -31,6 +31,11 @@
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;
@@ -94,6 +99,7 @@ void testClassWithoutAnnotations() {
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class EnabledPublicApiAnnotationInheritance {
+
@BeforeAll
void beforeAll() {
init(true);
@@ -104,6 +110,13 @@ void afterAll() {
reset();
}
+ private TestClassBase createTestClassInstance(Class extends TestClassBase> testClass)
+ throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
+ Constructor extends TestClassBase> declaredConstructor = testClass.getDeclaredConstructor();
+ declaredConstructor.setAccessible(true);
+ return declaredConstructor.newInstance();
+ }
+
@Test
void testClassWithAnnotations() {
invokeApiMethods(new ClassWithAnnotations());
@@ -111,36 +124,43 @@ void testClassWithAnnotations() {
assertThat(reporter.getSpans()).hasSize(1);
}
- @Test
- void testInheritedCaptureTransaction() {
- new ClassWithoutAnnotations().captureTransaction();
- checkTransaction("ClassWithoutAnnotations#captureTransaction");
+ @ParameterizedTest
+ @ValueSource(classes = {ClassWithoutAnnotations.class, TransitiveClassWithoutAnnotations.class, InterfaceImplementor.class})
+ void testInheritedCaptureTransaction(Class extends TestClassBase> testClass) throws Exception {
+ TestClassBase instance = createTestClassInstance(testClass);
+ instance.captureTransaction();
+ checkTransaction(testClass.getSimpleName() + "#captureTransaction");
}
- @Test
- void testInheritedCaptureSpan() {
+
+ @ParameterizedTest
+ @ValueSource(classes = {ClassWithoutAnnotations.class, TransitiveClassWithoutAnnotations.class, InterfaceImplementor.class})
+ void testInheritedCaptureSpan(Class extends TestClassBase> testClass) throws Exception {
+ TestClassBase instance = createTestClassInstance(testClass);
Transaction transaction = ElasticApm.startTransaction();
try (Scope scope = transaction.activate()) {
- new ClassWithoutAnnotations().captureSpan();
+ instance.captureSpan();
}
transaction.end();
- checkSpan("ClassWithoutAnnotations#captureSpan");
+ checkSpan(testClass.getSimpleName() + "#captureSpan");
}
- @Test
- void testInheritedTracedWithoutActiveTransaction() {
- new ClassWithoutAnnotations().traced();
- checkTransaction("ClassWithoutAnnotations#traced");
+ @ParameterizedTest
+ @ValueSource(classes = {ClassWithoutAnnotations.class, TransitiveClassWithoutAnnotations.class, InterfaceImplementor.class})
+ void testInheritedTracedWithoutActiveTransaction(Class extends TestClassBase> testClass) throws Exception {
+ createTestClassInstance(testClass).traced();
+ checkTransaction(testClass.getSimpleName() + "#traced");
}
- @Test
- void testInheritedTracedWithActiveTransaction() {
+ @ParameterizedTest
+ @ValueSource(classes = {ClassWithoutAnnotations.class, TransitiveClassWithoutAnnotations.class, InterfaceImplementor.class})
+ void testInheritedTracedWithActiveTransaction(Class extends TestClassBase> testClass) throws Exception {
Transaction transaction = ElasticApm.startTransaction();
try (Scope scope = transaction.activate()) {
- new ClassWithoutAnnotations().traced();
+ createTestClassInstance(testClass).traced();
}
transaction.end();
- checkSpan("ClassWithoutAnnotations#traced");
+ checkSpan(testClass.getSimpleName() + "#traced");
}
private void checkTransaction(String name) {
@@ -166,7 +186,16 @@ private void invokeApiMethods(ClassWithAnnotations classWithAnnotations) {
classWithAnnotations.traced();
}
- static class ClassWithAnnotations {
+
+ abstract static class TestClassBase {
+ abstract void captureTransaction();
+
+ abstract void captureSpan();
+
+ abstract void traced();
+ }
+
+ static class ClassWithAnnotations extends TestClassBase {
@CaptureTransaction
void captureTransaction() {
}
@@ -193,4 +222,46 @@ void captureSpan() {
void traced() {
}
}
+
+ static class EmptyClass extends ClassWithAnnotations {
+ }
+
+ static class TransitiveClassWithoutAnnotations extends EmptyClass {
+ @Override
+ void captureTransaction() {
+ }
+
+ @Override
+ void captureSpan() {
+ }
+
+ @Override
+ void traced() {
+ }
+ }
+
+ interface InterfaceWithAnnotations {
+ @CaptureTransaction
+ void captureTransaction();
+
+ @CaptureSpan
+ void captureSpan();
+
+ @Traced
+ void traced();
+ }
+
+ static class InterfaceImplementor extends TestClassBase implements InterfaceWithAnnotations {
+
+ public void captureTransaction() {
+ }
+
+ public void captureSpan() {
+ }
+
+ @Override
+ public void traced() {
+ }
+ }
+
}
From c5ed2e1cb4d496c8f36afd1610ccbf48ced88f22 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Mon, 11 Mar 2024 18:29:36 +0100
Subject: [PATCH 008/132] powershell no-logo (#3556)
---
CHANGELOG.asciidoc | 1 +
.../java/co/elastic/apm/agent/impl/metadata/SystemInfo.java | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 96e2ec1b21..c989a23500 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -44,6 +44,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Bug fixes
* Avoid another case where we might touch application exceptions for `safe_exceptions` - {pull}3553[#3553]
+* More robust hostname detection on Windows - {pull}3556[#3556]
[[release-notes-1.48.0]]
==== 1.48.0 - 2024/03/05
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
index baf8820d1b..68624213ef 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
@@ -188,7 +188,10 @@ static String fallbackHostnameDiscovery(boolean isWindows) {
static String discoverHostnameThroughCommand(boolean isWindows, long timeoutMillis) {
String hostname;
if (isWindows) {
- hostname = executeHostnameDiscoveryCommand(Arrays.asList("powershell.exe", "[System.Net.Dns]::GetHostEntry($env:computerName).HostName"), timeoutMillis);
+ List powershellCmd = Arrays.asList("powershell.exe",
+ "-NoLogo", "-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass",
+ "-Command", "[System.Net.Dns]::GetHostEntry($env:computerName).HostName");
+ hostname = executeHostnameDiscoveryCommand(powershellCmd, timeoutMillis);
if (hostname == null || hostname.isEmpty()) {
hostname = executeHostnameDiscoveryCommand(Arrays.asList("cmd.exe", "/c", "hostname"), timeoutMillis);
}
From f45c74616f0c2d361f825f13e6beab97062b77c3 Mon Sep 17 00:00:00 2001
From: Jan Calanog
Date: Tue, 12 Mar 2024 10:02:33 +0100
Subject: [PATCH 009/132] security: add permissions block to workflows (#3531)
---
.github/workflows/addToProject.yml | 3 +++
.github/workflows/labeler.yml | 5 +++++
.github/workflows/snapshot.yml | 3 +++
.github/workflows/test-reporter.yml | 5 +++++
4 files changed, 16 insertions(+)
diff --git a/.github/workflows/addToProject.yml b/.github/workflows/addToProject.yml
index 7f49a3a657..e7befea26f 100644
--- a/.github/workflows/addToProject.yml
+++ b/.github/workflows/addToProject.yml
@@ -3,6 +3,9 @@ on:
issues:
types:
- opened, milestoned
+permissions:
+ contents: read
+
jobs:
add_to_project:
if: github.event.issue && github.event.issue.milestone
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 36eb42ad80..809b6eda02 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -5,6 +5,11 @@ on:
pull_request_target:
types: [opened]
+permissions:
+ contents: read
+ issues: write
+ pull-requests: write
+
jobs:
triage:
runs-on: ubuntu-latest
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 355e919c84..86d6353476 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -12,6 +12,9 @@ on:
default: false
type: boolean
+permissions:
+ contents: read
+
jobs:
deploy:
name: Deploy
diff --git a/.github/workflows/test-reporter.yml b/.github/workflows/test-reporter.yml
index 57c29a50e1..dae96d5e09 100644
--- a/.github/workflows/test-reporter.yml
+++ b/.github/workflows/test-reporter.yml
@@ -8,6 +8,11 @@ on:
types:
- completed
+permissions:
+ contents: read
+ actions: read
+ checks: write
+
jobs:
report:
runs-on: ubuntu-latest
From dfa95191a210369c9c8b8eab8909cdd39079913a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 12 Mar 2024 10:07:01 +0100
Subject: [PATCH 010/132] Bump io.micrometer:micrometer-core from 1.12.2 to
1.12.4 (#3559)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.2 to 1.12.4.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.2...v1.12.4)
---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-micrometer-plugin/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
index 1bf14f7a15..8ff7909d41 100644
--- a/apm-agent-plugins/apm-micrometer-plugin/pom.xml
+++ b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
@@ -29,7 +29,7 @@
io.micrometer
micrometer-core
- 1.12.2
+ 1.12.4
provided
From d8ae52b96a21ece930624938882f5d447fcaf94d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 12 Mar 2024 09:54:51 +0000
Subject: [PATCH 011/132] Bump version.log4j from 2.12.4 to 2.23.1 (#3557)
* Bump version.log4j from 2.12.4 to 2.23.1
Bumps `version.log4j` from 2.12.4 to 2.23.1.
Updates `org.apache.logging.log4j:log4j-core` from 2.12.4 to 2.23.1
Updates `org.apache.logging.log4j:log4j-slf4j-impl` from 2.12.4 to 2.23.1
---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j-impl
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* restore previous log4j version
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
apm-agent-plugins/apm-ecs-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml b/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml
index f261b19bc2..5644c1d34d 100644
--- a/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml
+++ b/apm-agent-plugins/apm-ecs-logging-plugin/pom.xml
@@ -41,7 +41,7 @@
org.apache.logging.log4j
log4j-core
- 2.23.0
+ 2.23.1
provided
true
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 a64a1a0f33..b5f08e2b67 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
@@ -24,7 +24,7 @@
org.apache.logging.log4j
log4j-core
- 2.23.0
+ 2.23.1
provided
From 464b9c134c9d74e2a482367e9c1e8a1a8e2ba97e Mon Sep 17 00:00:00 2001
From: Rafael Winterhalter
Date: Tue, 12 Mar 2024 14:32:41 +0100
Subject: [PATCH 012/132] Add API for instrumenting FAAS and adjust the AWS
plugin (#3516)
---------
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
.../apm/agent/impl/ElasticApmTracer.java | 39 +++++++++++++-
.../apm/agent/impl/context/Request.java | 8 +--
.../apm/agent/impl/context/Response.java | 7 ++-
.../apm/agent/impl/context/ServiceOrigin.java | 5 +-
.../impl/context/TransactionContext.java | 1 +
.../apm/agent/impl/transaction/Faas.java | 7 ++-
.../agent/impl/transaction/FaasTrigger.java | 4 +-
.../apm-awslambda-plugin/pom.xml | 6 ---
...stractAwsLambdaHandlerInstrumentation.java | 4 +-
.../RequestHandlerInstrumentation.java | 10 ++--
.../RequestStreamHandlerInstrumentation.java | 10 ++--
.../APIGatewayProxyV1TransactionHelper.java | 16 +++---
.../APIGatewayProxyV2TransactionHelper.java | 16 +++---
.../awslambda/helper/AWSEventsHelper.java | 6 +--
.../AbstractAPIGatewayTransactionHelper.java | 36 ++++++-------
.../AbstractLambdaTransactionHelper.java | 54 +++++--------------
...AbstractMessageBasedTransactionHelper.java | 20 +++----
.../helper/PlainTransactionHelper.java | 14 ++---
.../awslambda/helper/S3TransactionHelper.java | 24 ++++-----
.../helper/SNSTransactionHelper.java | 10 ++--
.../helper/SQSTransactionHelper.java | 10 ++--
.../co/elastic/apm/agent/tracer/Faas.java | 36 +++++++++++++
.../elastic/apm/agent/tracer/FaasTrigger.java | 28 ++++++++++
.../apm/agent/tracer/GlobalTracer.java | 10 ++++
.../elastic/apm/agent/tracer/NoopTracer.java | 9 ++++
.../apm/agent/tracer/ServiceOrigin.java | 30 +++++++++++
.../co/elastic/apm/agent/tracer/Tracer.java | 4 ++
.../elastic/apm/agent/tracer/Transaction.java | 2 +
.../apm/agent/tracer/TransactionContext.java | 2 +
.../apm/agent/tracer/metadata/Request.java | 9 ++++
.../apm/agent/tracer/metadata/Response.java | 2 +
31 files changed, 288 insertions(+), 151 deletions(-)
create mode 100644 apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Faas.java
create mode 100644 apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/FaasTrigger.java
create mode 100644 apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/ServiceOrigin.java
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
index 6980d1812e..08cb977c59 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
@@ -18,7 +18,9 @@
*/
package co.elastic.apm.agent.impl;
+import co.elastic.apm.agent.bci.ElasticApmAgent;
import co.elastic.apm.agent.bci.IndyBootstrap;
+import co.elastic.apm.agent.bci.InstrumentationStats;
import co.elastic.apm.agent.collections.WeakReferenceCountedMap;
import co.elastic.apm.agent.common.JvmRuntimeInfo;
import co.elastic.apm.agent.common.util.WildcardMatcher;
@@ -27,7 +29,12 @@
import co.elastic.apm.agent.configuration.MetricsConfiguration;
import co.elastic.apm.agent.configuration.ServerlessConfiguration;
import co.elastic.apm.agent.impl.error.RedactedException;
+import co.elastic.apm.agent.impl.metadata.FaaSMetaDataExtension;
+import co.elastic.apm.agent.impl.metadata.Framework;
+import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
+import co.elastic.apm.agent.impl.metadata.NameAndIdField;
import co.elastic.apm.agent.impl.metadata.ServiceFactory;
+import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
import co.elastic.apm.agent.tracer.service.Service;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
import co.elastic.apm.agent.configuration.SpanConfiguration;
@@ -36,7 +43,6 @@
import co.elastic.apm.agent.impl.baggage.Baggage;
import co.elastic.apm.agent.impl.baggage.W3CBaggagePropagation;
import co.elastic.apm.agent.impl.error.ErrorCapture;
-import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
import co.elastic.apm.agent.impl.sampling.ProbabilitySampler;
import co.elastic.apm.agent.impl.sampling.Sampler;
import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
@@ -83,6 +89,7 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
/**
@@ -93,6 +100,7 @@
*/
public class ElasticApmTracer implements Tracer {
private static final Logger logger = LoggerFactory.getLogger(ElasticApmTracer.class);
+ private static final Logger enabledInstrumentationsLogger = LoggerUtils.logOnce(logger);
private static final WeakMap serviceInfoByClassLoader = WeakConcurrent.buildMap();
@@ -1007,4 +1015,33 @@ public Throwable redactExceptionIfRequired(@Nullable Throwable original) {
}
return original;
}
+
+ @Override
+ public void flush() {
+ long flushTimeout = configurationRegistry.getConfig(ServerlessConfiguration.class).getDataFlushTimeout();
+ try {
+ if (!reporter.flush(flushTimeout, TimeUnit.MILLISECONDS, true)) {
+ logger.error("APM data flush haven't completed within {} milliseconds.", flushTimeout);
+ }
+ } catch (Exception e) {
+ logger.error("An error occurred on flushing APM data.", e);
+ }
+ logEnabledInstrumentations();
+ }
+
+ private void logEnabledInstrumentations() {
+ if (enabledInstrumentationsLogger.isInfoEnabled()) {
+ InstrumentationStats instrumentationStats = ElasticApmAgent.getInstrumentationStats();
+ enabledInstrumentationsLogger.info("Used instrumentation groups: {}", instrumentationStats.getUsedInstrumentationGroups());
+ }
+ }
+
+ @Override
+ public void completeMetaData(String name, String version, String id, String region) {
+ metaDataFuture.getFaaSMetaDataExtensionFuture().complete(new FaaSMetaDataExtension(
+ new Framework(name, version),
+ new NameAndIdField(null, id),
+ region
+ ));
+ }
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java
index 028882f4e6..a6d2694b4e 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java
@@ -175,13 +175,7 @@ public PotentiallyMultiValuedMap getFormUrlEncodedParameters() {
return postParams;
}
- /**
- * Adds a request header.
- *
- * @param headerName The name of the header.
- * @param headerValue The value of the header.
- * @return {@code this}, for fluent method chaining
- */
+ @Override
public Request addHeader(String headerName, @Nullable String headerValue) {
if (headerValue != null) {
headers.add(headerName, headerValue);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java
index 811f89293a..4a6ef90b99 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java
@@ -60,8 +60,11 @@ public Response withFinished(boolean finished) {
* @param headerValue The value of the header.
* @return {@code this}, for fluent method chaining
*/
- public Response addHeader(String headerName, String headerValue) {
- headers.add(headerName, headerValue);
+ @Override
+ public Response addHeader(String headerName, @Nullable String headerValue) {
+ if (headerValue != null) {
+ headers.add(headerName, headerValue);
+ }
return this;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java
index 9927f7b66e..5cdf69b407 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java
@@ -28,7 +28,7 @@
* If a request originated from another service,
* the service origin interface can be used to collect information about the origin service.
*/
-public class ServiceOrigin implements Recyclable {
+public class ServiceOrigin implements co.elastic.apm.agent.tracer.ServiceOrigin, Recyclable {
@Nullable
private String id;
@@ -43,6 +43,7 @@ public String getId() {
return id;
}
+ @Override
public ServiceOrigin withId(@Nullable String id) {
this.id = id;
return this;
@@ -52,6 +53,7 @@ public StringBuilder getName() {
return name;
}
+ @Override
public ServiceOrigin withName(@Nullable CharSequence name) {
this.name.setLength(0);
if (name != null) {
@@ -72,6 +74,7 @@ public String getVersion() {
return version;
}
+ @Override
public ServiceOrigin withVersion(@Nullable String version) {
this.version = version;
return this;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java
index c4c9ea756b..05df0e1015 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java
@@ -118,6 +118,7 @@ public CloudOrigin getCloudOrigin() {
return cloudOrigin;
}
+ @Override
public ServiceOrigin getServiceOrigin() {
return serviceOrigin;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Faas.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Faas.java
index 9d7e73b5f8..1299184003 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Faas.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Faas.java
@@ -22,7 +22,7 @@
import javax.annotation.Nullable;
-public class Faas implements Recyclable {
+public class Faas implements co.elastic.apm.agent.tracer.Faas, Recyclable {
@Nullable
private String execution;
@@ -68,26 +68,31 @@ public String getVersion() {
return version;
}
+ @Override
public Faas withExecution(@Nullable String execution) {
this.execution = execution;
return this;
}
+ @Override
public Faas withColdStart(boolean coldStart) {
this.coldStart = coldStart;
return this;
}
+ @Override
public Faas withId(@Nullable String id) {
this.id = id;
return this;
}
+ @Override
public Faas withName(@Nullable String name) {
this.name = name;
return this;
}
+ @Override
public Faas withVersion(@Nullable String version) {
this.version = version;
return this;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/FaasTrigger.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/FaasTrigger.java
index 6d80601634..d3d3fb3775 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/FaasTrigger.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/FaasTrigger.java
@@ -22,7 +22,7 @@
import javax.annotation.Nullable;
-public class FaasTrigger implements Recyclable {
+public class FaasTrigger implements co.elastic.apm.agent.tracer.FaasTrigger, Recyclable {
@Nullable
private String type;
@@ -40,11 +40,13 @@ public String getRequestId() {
return requestId;
}
+ @Override
public FaasTrigger withType(@Nullable String type) {
this.type = type;
return this;
}
+ @Override
public FaasTrigger withRequestId(@Nullable String requestId) {
this.requestId = requestId;
return this;
diff --git a/apm-agent-plugins/apm-awslambda-plugin/pom.xml b/apm-agent-plugins/apm-awslambda-plugin/pom.xml
index 2fc9a49e39..f4819bbdeb 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/pom.xml
+++ b/apm-agent-plugins/apm-awslambda-plugin/pom.xml
@@ -17,12 +17,6 @@
-
-
- ${project.groupId}
- apm-agent-core
- ${project.version}
-
com.amazonaws
aws-lambda-java-core
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/AbstractAwsLambdaHandlerInstrumentation.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/AbstractAwsLambdaHandlerInstrumentation.java
index d447a53d40..a79ee7c37c 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/AbstractAwsLambdaHandlerInstrumentation.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/AbstractAwsLambdaHandlerInstrumentation.java
@@ -18,8 +18,8 @@
*/
package co.elastic.apm.agent.awslambda;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
@@ -41,7 +41,7 @@ public abstract class AbstractAwsLambdaHandlerInstrumentation extends ElasticApm
@Nullable
protected String handlerMethodName;
- public AbstractAwsLambdaHandlerInstrumentation(ElasticApmTracer tracer) {
+ public AbstractAwsLambdaHandlerInstrumentation(Tracer tracer) {
serverlessConfiguration = tracer.getConfig(ServerlessConfiguration.class);
String awsLambdaHandler = serverlessConfiguration.getAwsLambdaHandler();
//noinspection ConstantConditions
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestHandlerInstrumentation.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestHandlerInstrumentation.java
index 0d443b1316..a709840e7e 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestHandlerInstrumentation.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestHandlerInstrumentation.java
@@ -20,8 +20,8 @@
import co.elastic.apm.agent.awslambda.helper.AWSEventsHelper;
import co.elastic.apm.agent.awslambda.helper.PlainTransactionHelper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.method.MethodDescription;
@@ -35,7 +35,7 @@
public class RequestHandlerInstrumentation extends AbstractAwsLambdaHandlerInstrumentation {
- public RequestHandlerInstrumentation(ElasticApmTracer tracer) {
+ public RequestHandlerInstrumentation(Tracer tracer) {
super(tracer);
}
@@ -70,8 +70,8 @@ public static Object handlerEnter(@Nullable @Advice.Argument(value = 0) Object i
public static void handlerExit(@Nullable @Advice.Enter Object transactionObj,
@Nullable @Advice.Thrown Throwable thrown,
@Nullable @Advice.Return Object output) {
- if (transactionObj instanceof Transaction) {
- Transaction transaction = (Transaction) transactionObj;
+ if (transactionObj instanceof Transaction>) {
+ Transaction> transaction = (Transaction>) transactionObj;
if (output != null && output.getClass().getName().startsWith("com.amazonaws.services.lambda.runtime.events")) {
// handler uses aws events, it's safe to assume that the AWS events classes are available
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestStreamHandlerInstrumentation.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestStreamHandlerInstrumentation.java
index a32e9a5246..e97fe84d19 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestStreamHandlerInstrumentation.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/RequestStreamHandlerInstrumentation.java
@@ -19,8 +19,8 @@
package co.elastic.apm.agent.awslambda;
import co.elastic.apm.agent.awslambda.helper.PlainTransactionHelper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.method.MethodDescription;
@@ -35,7 +35,7 @@
public class RequestStreamHandlerInstrumentation extends AbstractAwsLambdaHandlerInstrumentation {
- public RequestStreamHandlerInstrumentation(ElasticApmTracer tracer) {
+ public RequestStreamHandlerInstrumentation(Tracer tracer) {
super(tracer);
}
@@ -65,8 +65,8 @@ public static Object handlerEnter(@Advice.Argument(value = 0) InputStream inputS
@Advice.OnMethodExit(suppress = Throwable.class, inline = false, onThrowable = Throwable.class)
public static void handlerExit(@Nullable @Advice.Enter Object transactionObj,
@Nullable @Advice.Thrown Throwable thrown) {
- if (transactionObj instanceof Transaction) {
- Transaction transaction = (Transaction) transactionObj;
+ if (transactionObj instanceof Transaction>) {
+ Transaction> transaction = (Transaction>) transactionObj;
PlainTransactionHelper.getInstance().finalizeTransaction(transaction, null, thrown);
}
}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
index d2d4589d9c..20cbe4c828 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
@@ -19,10 +19,10 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.MapTextHeaderGetter;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
@@ -35,20 +35,20 @@ public class APIGatewayProxyV1TransactionHelper extends AbstractAPIGatewayTransa
@Nullable
private static APIGatewayProxyV1TransactionHelper INSTANCE;
- private APIGatewayProxyV1TransactionHelper(ElasticApmTracer tracer) {
+ private APIGatewayProxyV1TransactionHelper(Tracer tracer) {
super(tracer);
}
public static APIGatewayProxyV1TransactionHelper getInstance() {
if (INSTANCE == null) {
- INSTANCE = new APIGatewayProxyV1TransactionHelper(GlobalTracer.get().require(ElasticApmTracer.class));
+ INSTANCE = new APIGatewayProxyV1TransactionHelper(GlobalTracer.get());
}
return INSTANCE;
}
@Override
- protected Transaction doStartTransaction(APIGatewayProxyRequestEvent apiGatewayEvent, Context lambdaContext) {
- Transaction transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
+ protected Transaction> doStartTransaction(APIGatewayProxyRequestEvent apiGatewayEvent, Context lambdaContext) {
+ Transaction> transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
String host = getHost(apiGatewayEvent);
if (null != transaction) {
@@ -92,7 +92,7 @@ private String getQueryString(APIGatewayProxyRequestEvent apiGatewayEvent) {
}
@Override
- public void captureOutputForTransaction(Transaction transaction, APIGatewayProxyResponseEvent responseEvent) {
+ public void captureOutputForTransaction(Transaction> transaction, APIGatewayProxyResponseEvent responseEvent) {
Integer statusCode = responseEvent.getStatusCode();
if (statusCode == null) {
statusCode = 0;
@@ -101,7 +101,7 @@ public void captureOutputForTransaction(Transaction transaction, APIGatewayProxy
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, APIGatewayProxyRequestEvent apiGatewayRequest) {
+ protected void setTransactionTriggerData(Transaction> transaction, APIGatewayProxyRequestEvent apiGatewayRequest) {
super.setTransactionTriggerData(transaction, apiGatewayRequest);
APIGatewayProxyRequestEvent.ProxyRequestContext rContext = apiGatewayRequest.getRequestContext();
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
index ec7ed0db69..db3edf620b 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
@@ -19,10 +19,10 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.MapTextHeaderGetter;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse;
@@ -33,20 +33,20 @@ public class APIGatewayProxyV2TransactionHelper extends AbstractAPIGatewayTransa
@Nullable
private static APIGatewayProxyV2TransactionHelper INSTANCE;
- private APIGatewayProxyV2TransactionHelper(ElasticApmTracer tracer) {
+ private APIGatewayProxyV2TransactionHelper(Tracer tracer) {
super(tracer);
}
public static APIGatewayProxyV2TransactionHelper getInstance() {
if (INSTANCE == null) {
- INSTANCE = new APIGatewayProxyV2TransactionHelper(GlobalTracer.get().require(ElasticApmTracer.class));
+ INSTANCE = new APIGatewayProxyV2TransactionHelper(GlobalTracer.get());
}
return INSTANCE;
}
@Override
- protected Transaction doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
- Transaction transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
+ protected Transaction> doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
+ Transaction> transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
APIGatewayV2HTTPEvent.RequestContext requestContext = apiGatewayEvent.getRequestContext();
if (transaction != null) {
@@ -60,12 +60,12 @@ protected Transaction doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent,
}
@Override
- public void captureOutputForTransaction(Transaction transaction, APIGatewayV2HTTPResponse responseEvent) {
+ public void captureOutputForTransaction(Transaction> transaction, APIGatewayV2HTTPResponse responseEvent) {
fillHttpResponseData(transaction, responseEvent.getHeaders(), responseEvent.getStatusCode());
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
+ protected void setTransactionTriggerData(Transaction> transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
super.setTransactionTriggerData(transaction, apiGatewayRequest);
APIGatewayV2HTTPEvent.RequestContext rContext = apiGatewayRequest.getRequestContext();
setApiGatewayContextData(transaction, rContext.getRequestId(), rContext.getApiId(),
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
index 9ec285ad99..b72c423c79 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
@@ -33,7 +33,7 @@
public class AWSEventsHelper {
@Nullable
- public static Transaction startTransaction(Object input, Context lambdaContext) {
+ public static Transaction> startTransaction(Object input, Context lambdaContext) {
if (input instanceof APIGatewayV2HTTPEvent && ((APIGatewayV2HTTPEvent) input).getRequestContext() != null
&& ((APIGatewayV2HTTPEvent) input).getRequestContext().getHttp() != null) {
// API Gateway V2 trigger
@@ -54,7 +54,7 @@ public static Transaction startTransaction(Object input, Context lambdaContext)
return PlainTransactionHelper.getInstance().startTransaction(input, lambdaContext);
}
- public static void finalizeTransaction(Transaction transaction, Object output, @Nullable Throwable thrown) {
+ public static void finalizeTransaction(Transaction> transaction, Object output, @Nullable Throwable thrown) {
if (output instanceof APIGatewayV2HTTPResponse) {
APIGatewayProxyV2TransactionHelper.getInstance().finalizeTransaction(transaction, (APIGatewayV2HTTPResponse) output, thrown);
} else if (output instanceof APIGatewayProxyResponseEvent) {
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
index 72c1d0eecb..b30ba86151 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
@@ -18,13 +18,13 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.context.CloudOrigin;
-import co.elastic.apm.agent.impl.context.Request;
-import co.elastic.apm.agent.impl.context.Response;
-import co.elastic.apm.agent.impl.context.ServiceOrigin;
+import co.elastic.apm.agent.tracer.ServiceOrigin;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
+import co.elastic.apm.agent.tracer.metadata.CloudOrigin;
+import co.elastic.apm.agent.tracer.metadata.Request;
+import co.elastic.apm.agent.tracer.metadata.Response;
import co.elastic.apm.agent.tracer.util.ResultUtil;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -47,13 +47,13 @@ public abstract class AbstractAPIGatewayTransactionHelper extends Abstract
private static final Set METHODS_WITH_BODY = new HashSet<>(Arrays.asList("POST", "PUT", "PATCH", "DELETE"));
private static final String CONTENT_TYPE_FROM_URLENCODED = "application/x-www-form-urlencoded";
- protected AbstractAPIGatewayTransactionHelper(ElasticApmTracer tracer) {
+ protected AbstractAPIGatewayTransactionHelper(Tracer tracer) {
super(tracer);
}
protected abstract String getApiGatewayVersion();
- protected void fillHttpRequestData(Transaction transaction, @Nullable String httpMethod, @Nullable Map headers, @Nullable String serverName, @Nullable String path, @Nullable String queryString, @Nullable String body) {
+ protected void fillHttpRequestData(Transaction> transaction, @Nullable String httpMethod, @Nullable Map headers, @Nullable String serverName, @Nullable String path, @Nullable String queryString, @Nullable String body) {
Request request = transaction.getContext().getRequest();
request.withMethod(httpMethod);
fillUrlRelatedFields(request, serverName, path, queryString);
@@ -67,7 +67,7 @@ protected void fillHttpRequestData(Transaction transaction, @Nullable String htt
}
}
- protected void fillHttpResponseData(Transaction transaction, @Nullable Map headers, int statusCode) {
+ protected void fillHttpResponseData(Transaction> transaction, @Nullable Map headers, int statusCode) {
Response response = transaction.getContext().getResponse();
response.withFinished(true);
if (transaction.isSampled() && null != headers && isCaptureHeaders()) {
@@ -82,17 +82,11 @@ protected void fillHttpResponseData(Transaction transaction, @Nullable Map transaction, @Nullable String method, @Nullable String contentTypeHeader) {
Request request = transaction.getContext().getRequest();
if (hasBody(contentTypeHeader, method)) {
if (coreConfiguration.getCaptureBody() != OFF
@@ -127,7 +121,7 @@ private boolean hasBody(@Nullable String contentTypeHeader, @Nullable String met
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, I apiGatewayRequest) {
+ protected void setTransactionTriggerData(Transaction> transaction, I apiGatewayRequest) {
transaction.withType(TRANSACTION_TYPE);
CloudOrigin cloudOrigin = transaction.getContext().getCloudOrigin();
cloudOrigin.withServiceName("api gateway");
@@ -136,7 +130,7 @@ protected void setTransactionTriggerData(Transaction transaction, I apiGatewayRe
transaction.getContext().getServiceOrigin().withVersion(getApiGatewayVersion());
}
- protected void setApiGatewayContextData(Transaction transaction, @Nullable String requestId, @Nullable String apiId,
+ protected void setApiGatewayContextData(Transaction> transaction, @Nullable String requestId, @Nullable String apiId,
@Nullable String domainName, @Nullable String accountId) {
transaction.getFaas().getTrigger().withRequestId(requestId);
ServiceOrigin serviceOrigin = transaction.getContext().getServiceOrigin();
@@ -146,7 +140,7 @@ protected void setApiGatewayContextData(Transaction transaction, @Nullable Strin
transaction.getContext().getCloudOrigin().withAccountId(accountId);
}
- private void setRequestHeaders(Transaction transaction, Map headers) {
+ private void setRequestHeaders(Transaction> transaction, Map headers) {
final Request req = transaction.getContext().getRequest();
if (transaction.isSampled() && isCaptureHeaders()) {
for (Map.Entry headerEntry : headers.entrySet()) {
@@ -156,7 +150,7 @@ private void setRequestHeaders(Transaction transaction, Map head
}
@Override
- protected void setTransactionName(Transaction transaction, I event, Context lambdaContext) {
+ protected void setTransactionName(Transaction> transaction, I event, Context lambdaContext) {
StringBuilder transactionName = transaction.getAndOverrideName(AbstractSpan.PRIORITY_HIGH_LEVEL_FRAMEWORK);
if (transactionName != null) {
String httpMethod = getHttpMethod(event);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractLambdaTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractLambdaTransactionHelper.java
index 8c61317ce1..2763e7423b 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractLambdaTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractLambdaTransactionHelper.java
@@ -18,50 +18,42 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.bci.ElasticApmAgent;
-import co.elastic.apm.agent.bci.InstrumentationStats;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import co.elastic.apm.agent.tracer.configuration.CoreConfiguration;
import co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration;
import co.elastic.apm.agent.tracer.configuration.WebConfiguration;
-import co.elastic.apm.agent.impl.metadata.FaaSMetaDataExtension;
-import co.elastic.apm.agent.impl.metadata.Framework;
-import co.elastic.apm.agent.impl.metadata.NameAndIdField;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.tracer.AbstractSpan;
-import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
import co.elastic.apm.agent.sdk.internal.util.VersionUtils;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import javax.annotation.Nullable;
-import java.util.concurrent.TimeUnit;
public abstract class AbstractLambdaTransactionHelper {
private static final Logger logger = LoggerFactory.getLogger(AbstractLambdaTransactionHelper.class);
- private static final Logger enabledInstrumentationsLogger = LoggerUtils.logOnce(logger);
- protected final ElasticApmTracer tracer;
+ protected final Tracer tracer;
protected final ServerlessConfiguration serverlessConfiguration;
protected final CoreConfiguration coreConfiguration;
protected final WebConfiguration webConfiguration;
- protected AbstractLambdaTransactionHelper(ElasticApmTracer tracer) {
+ protected AbstractLambdaTransactionHelper(Tracer tracer) {
this.tracer = tracer;
this.coreConfiguration = tracer.getConfig(CoreConfiguration.class);
this.webConfiguration = tracer.getConfig(WebConfiguration.class);
this.serverlessConfiguration = tracer.getConfig(ServerlessConfiguration.class);
}
- protected abstract void setTransactionTriggerData(Transaction transaction, I input);
+ protected abstract void setTransactionTriggerData(Transaction> transaction, I input);
@Nullable
- protected abstract Transaction doStartTransaction(I input, Context lambdaContext);
+ protected abstract Transaction> doStartTransaction(I input, Context lambdaContext);
- protected abstract void captureOutputForTransaction(Transaction transaction, O output);
+ protected abstract void captureOutputForTransaction(Transaction> transaction, O output);
private static boolean coldStart = true;
@@ -69,13 +61,13 @@ protected AbstractLambdaTransactionHelper(ElasticApmTracer tracer) {
private String functionArn;
@Nullable
- public Transaction startTransaction(I input, Context lambdaContext) {
+ public Transaction> startTransaction(I input, Context lambdaContext) {
boolean isColdStart = coldStart;
if (isColdStart) {
completeMetaData(lambdaContext);
coldStart = false;
}
- Transaction transaction = doStartTransaction(input, lambdaContext);
+ Transaction> transaction = doStartTransaction(input, lambdaContext);
if (null != transaction) {
transaction.getFaas()
.withId(getFaasId(lambdaContext))
@@ -104,7 +96,7 @@ private String getFaasId(Context lambdaContext) {
return functionArn;
}
- public void finalizeTransaction(Transaction transaction, @Nullable O output, @Nullable Throwable thrown) {
+ public void finalizeTransaction(Transaction> transaction, @Nullable O output, @Nullable Throwable thrown) {
try {
if (null != output) {
captureOutputForTransaction(transaction, output);
@@ -118,23 +110,7 @@ public void finalizeTransaction(Transaction transaction, @Nullable O output, @Nu
} finally {
transaction.deactivate().end();
}
- long flushTimeout = serverlessConfiguration.getDataFlushTimeout();
- try {
- if (!tracer.getReporter().flush(flushTimeout, TimeUnit.MILLISECONDS, true)) {
- logger.error("APM data flush haven't completed within {} milliseconds.", flushTimeout);
- }
- } catch (Exception e) {
- logger.error("An error occurred on flushing APM data.", e);
- }
-
- logEnabledInstrumentations();
- }
-
- private void logEnabledInstrumentations() {
- if (enabledInstrumentationsLogger.isInfoEnabled()) {
- InstrumentationStats instrumentationStats = ElasticApmAgent.getInstrumentationStats();
- enabledInstrumentationsLogger.info("Used instrumentation groups: {}", instrumentationStats.getUsedInstrumentationGroups());
- }
+ tracer.flush();
}
private void completeMetaData(Context lambdaContext) {
@@ -149,17 +125,13 @@ private void completeMetaData(Context lambdaContext) {
lambdaLibVersion = "unknown";
}
- tracer.getMetaDataFuture().getFaaSMetaDataExtensionFuture().complete(new FaaSMetaDataExtension(
- new Framework("AWS Lambda", lambdaLibVersion),
- new NameAndIdField(null, accountId),
- region
- ));
+ tracer.completeMetaData("AWS Lambda", lambdaLibVersion, accountId, region);
} catch (Exception e) {
logger.error("Failed updating metadata for first lambda execution!", e);
}
}
- protected void setTransactionName(Transaction transaction, I event, Context lambdaContext) {
+ protected void setTransactionName(Transaction> transaction, I event, Context lambdaContext) {
StringBuilder transactionName = transaction.getAndOverrideName(AbstractSpan.PRIORITY_HIGH_LEVEL_FRAMEWORK);
if (transactionName != null) {
transactionName.append(lambdaContext.getFunctionName());
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractMessageBasedTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractMessageBasedTransactionHelper.java
index 328d88febf..68071da7bc 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractMessageBasedTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractMessageBasedTransactionHelper.java
@@ -18,12 +18,12 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.context.CloudOrigin;
-import co.elastic.apm.agent.impl.context.ServiceOrigin;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.tracer.AbstractSpan;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.ServiceOrigin;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
+import co.elastic.apm.agent.tracer.metadata.CloudOrigin;
import com.amazonaws.services.lambda.runtime.Context;
import javax.annotation.Nullable;
@@ -31,7 +31,7 @@
public abstract class AbstractMessageBasedTransactionHelper extends AbstractLambdaTransactionHelper {
protected static final String TRANSACTION_TYPE = "messaging";
- protected AbstractMessageBasedTransactionHelper(ElasticApmTracer tracer) {
+ protected AbstractMessageBasedTransactionHelper(Tracer tracer) {
super(tracer);
}
@@ -50,23 +50,23 @@ protected AbstractMessageBasedTransactionHelper(ElasticApmTracer tracer) {
@Nullable
@Override
- protected Transaction doStartTransaction(I event, Context lambdaContext) {
- Transaction transaction = tracer.startRootTransaction(PrivilegedActionUtils.getClassLoader(lambdaContext.getClass()));
+ protected Transaction> doStartTransaction(I event, Context lambdaContext) {
+ Transaction> transaction = tracer.startRootTransaction(PrivilegedActionUtils.getClassLoader(lambdaContext.getClass()));
if (null != transaction) {
addSpanLinks(transaction, event);
}
return transaction;
}
- protected abstract void addSpanLinks(Transaction transaction, I event);
+ protected abstract void addSpanLinks(Transaction> transaction, I event);
@Override
- public void captureOutputForTransaction(Transaction transaction, O output) {
+ public void captureOutputForTransaction(Transaction> transaction, O output) {
// Nothing to do here
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, I event) {
+ protected void setTransactionTriggerData(Transaction> transaction, I event) {
R record = getFirstRecord(event);
transaction.withType(TRANSACTION_TYPE);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/PlainTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/PlainTransactionHelper.java
index d86880d0f4..a0453ad866 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/PlainTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/PlainTransactionHelper.java
@@ -18,10 +18,10 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
import javax.annotation.Nullable;
@@ -33,29 +33,29 @@ public class PlainTransactionHelper extends AbstractLambdaTransactionHelper doStartTransaction(Object input, Context lambdaContext) {
return tracer.startRootTransaction(PrivilegedActionUtils.getClassLoader(lambdaContext.getClass()));
}
@Override
- public void captureOutputForTransaction(Transaction transaction, Object output) {
+ public void captureOutputForTransaction(Transaction> transaction, Object output) {
// Nothing to do here
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, Object input) {
+ protected void setTransactionTriggerData(Transaction> transaction, Object input) {
transaction.getFaas().getTrigger().withType("other");
transaction.withType(TRANSACTION_TYPE);
}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/S3TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/S3TransactionHelper.java
index e2203a665d..ac00d9ef54 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/S3TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/S3TransactionHelper.java
@@ -18,14 +18,14 @@
*/
package co.elastic.apm.agent.awslambda.helper;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.tracer.AbstractSpan;
+import co.elastic.apm.agent.tracer.FaasTrigger;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.context.CloudOrigin;
-import co.elastic.apm.agent.impl.context.ServiceOrigin;
-import co.elastic.apm.agent.impl.transaction.FaasTrigger;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.ServiceOrigin;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
+import co.elastic.apm.agent.tracer.metadata.CloudOrigin;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.events.S3Event;
import com.amazonaws.services.lambda.runtime.events.models.s3.S3EventNotification;
@@ -38,13 +38,13 @@ public class S3TransactionHelper extends AbstractLambdaTransactionHelper doStartTransaction(S3Event s3Event, Context lambdaContext) {
return tracer.startRootTransaction(PrivilegedActionUtils.getClassLoader(lambdaContext.getClass()));
}
@Override
- public void captureOutputForTransaction(Transaction transaction, Void output) {
+ public void captureOutputForTransaction(Transaction> transaction, Void output) {
// Nothing to do here
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, S3Event s3Event) {
+ protected void setTransactionTriggerData(Transaction> transaction, S3Event s3Event) {
transaction.withType(TRANSACTION_TYPE);
FaasTrigger faasTrigger = transaction.getFaas().getTrigger();
@@ -97,7 +97,7 @@ protected void setTransactionTriggerData(Transaction transaction, S3Event s3Even
}
@Override
- protected void setTransactionName(Transaction transaction, S3Event s3Event, Context lambdaContext) {
+ protected void setTransactionName(Transaction> transaction, S3Event s3Event, Context lambdaContext) {
S3EventNotification.S3EventNotificationRecord s3NotificationRecord = getS3NotificationRecord(s3Event);
StringBuilder transactionName = transaction.getAndOverrideName(AbstractSpan.PRIORITY_HIGH_LEVEL_FRAMEWORK);
if (transactionName != null && null != s3NotificationRecord && null != s3NotificationRecord.getS3() && null != s3NotificationRecord.getS3().getBucket()) {
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SNSTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SNSTransactionHelper.java
index ed635f00e4..9e3425837b 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SNSTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SNSTransactionHelper.java
@@ -19,9 +19,9 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.SNSMessageAttributesGetter;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.events.SNSEvent;
import javax.annotation.Nullable;
@@ -33,13 +33,13 @@ public class SNSTransactionHelper extends AbstractMessageBasedTransactionHelper<
private final SNSEvent.SNSRecord placeholderRecord = new SNSEvent.SNSRecord();
- private SNSTransactionHelper(ElasticApmTracer tracer) {
+ private SNSTransactionHelper(Tracer tracer) {
super(tracer);
}
public static SNSTransactionHelper getInstance() {
if (INSTANCE == null) {
- INSTANCE = new SNSTransactionHelper(GlobalTracer.get().require(ElasticApmTracer.class));
+ INSTANCE = new SNSTransactionHelper(GlobalTracer.get());
}
return INSTANCE;
}
@@ -78,7 +78,7 @@ record = event.getRecords().get(0);
}
@Override
- protected void addSpanLinks(Transaction transaction, SNSEvent event) {
+ protected void addSpanLinks(Transaction> transaction, SNSEvent event) {
List records = event.getRecords();
if (records != null && !records.isEmpty()) {
for (SNSEvent.SNSRecord record : records) {
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SQSTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SQSTransactionHelper.java
index 218506a463..6f6ba9e807 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SQSTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/SQSTransactionHelper.java
@@ -19,9 +19,9 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.SQSMessageAttributesGetter;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.events.SQSEvent;
import javax.annotation.Nullable;
@@ -34,13 +34,13 @@ public class SQSTransactionHelper extends AbstractMessageBasedTransactionHelper<
private final SQSEvent.SQSMessage placeholderMessage = new SQSEvent.SQSMessage();
- private SQSTransactionHelper(ElasticApmTracer tracer) {
+ private SQSTransactionHelper(Tracer tracer) {
super(tracer);
}
public static SQSTransactionHelper getInstance() {
if (INSTANCE == null) {
- INSTANCE = new SQSTransactionHelper(GlobalTracer.get().require(ElasticApmTracer.class));
+ INSTANCE = new SQSTransactionHelper(GlobalTracer.get());
}
return INSTANCE;
}
@@ -76,7 +76,7 @@ record = event.getRecords().get(0);
}
@Override
- protected void addSpanLinks(Transaction transaction, SQSEvent event) {
+ protected void addSpanLinks(Transaction> transaction, SQSEvent event) {
List records = event.getRecords();
if (records != null && !records.isEmpty()) {
for (SQSEvent.SQSMessage record : records) {
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Faas.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Faas.java
new file mode 100644
index 0000000000..678c02b6ea
--- /dev/null
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Faas.java
@@ -0,0 +1,36 @@
+/*
+ * 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.tracer;
+
+import javax.annotation.Nullable;
+
+public interface Faas {
+
+ FaasTrigger getTrigger();
+
+ Faas withId(@Nullable String id);
+
+ Faas withName(@Nullable String name);
+
+ Faas withVersion(@Nullable String version);
+
+ Faas withExecution(@Nullable String execution);
+
+ Faas withColdStart(boolean coldStart);
+}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/FaasTrigger.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/FaasTrigger.java
new file mode 100644
index 0000000000..72fd88913e
--- /dev/null
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/FaasTrigger.java
@@ -0,0 +1,28 @@
+/*
+ * 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.tracer;
+
+import javax.annotation.Nullable;
+
+public interface FaasTrigger {
+
+ FaasTrigger withType(@Nullable String type);
+
+ FaasTrigger withRequestId(@Nullable String requestId);
+}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
index 449622326e..9cae3d1b20 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
@@ -156,4 +156,14 @@ public Service createService(String ephemeralId) {
public Throwable redactExceptionIfRequired(@Nullable Throwable original) {
return tracer.redactExceptionIfRequired(original);
}
+
+ @Override
+ public void flush() {
+ tracer.flush();
+ }
+
+ @Override
+ public void completeMetaData(String name, String version, String id, String region) {
+ tracer.completeMetaData(name, version, id, region);
+ }
}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
index 5ee5d8a652..ac1610f99d 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
@@ -25,6 +25,7 @@
import co.elastic.apm.agent.tracer.service.Service;
import javax.annotation.Nullable;
+import java.io.IOException;
import java.util.Collections;
import java.util.Set;
@@ -131,4 +132,12 @@ public Service createService(String ephemeralId) {
public Throwable redactExceptionIfRequired(@Nullable Throwable original) {
return original;
}
+
+ @Override
+ public void flush() {
+ }
+
+ @Override
+ public void completeMetaData(String name, String version, String id, String region) {
+ }
}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/ServiceOrigin.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/ServiceOrigin.java
new file mode 100644
index 0000000000..9159bb29b5
--- /dev/null
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/ServiceOrigin.java
@@ -0,0 +1,30 @@
+/*
+ * 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.tracer;
+
+import javax.annotation.Nullable;
+
+public interface ServiceOrigin {
+
+ ServiceOrigin withVersion(@Nullable String version);
+
+ ServiceOrigin withName(@Nullable CharSequence name);
+
+ ServiceOrigin withId(@Nullable String id);
+}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
index 1cd0529de8..666ea4fca6 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
@@ -91,4 +91,8 @@ public interface Tracer {
@Nullable
Throwable redactExceptionIfRequired(@Nullable Throwable original);
+
+ void flush();
+
+ void completeMetaData(String name, String version, String id, String region);
}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Transaction.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Transaction.java
index 1f6ade713c..aec2fafaba 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Transaction.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Transaction.java
@@ -57,6 +57,8 @@ public interface Transaction> extends AbstractSpan {
void setFrameworkVersion(@Nullable String frameworkVersion);
+ Faas getFaas();
+
void setPendingTransactionException(Throwable exception);
@Nullable
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/TransactionContext.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/TransactionContext.java
index baafaacb96..d1800dd91c 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/TransactionContext.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/TransactionContext.java
@@ -43,4 +43,6 @@ public interface TransactionContext extends AbstractContext {
User getUser();
CloudOrigin getCloudOrigin();
+
+ ServiceOrigin getServiceOrigin();
}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Request.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Request.java
index fe8afd2f5f..46ac03f623 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Request.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Request.java
@@ -75,6 +75,15 @@ public interface Request {
Request addFormUrlEncodedParameters(String key, String[] values);
+ /**
+ * Adds a request header.
+ *
+ * @param headerName The name of the header.
+ * @param headerValue The value of the header.
+ * @return {@code this}, for fluent method chaining
+ */
+ Request addHeader(String headerName, @Nullable String headerValue);
+
Request addHeader(String headerName, @Nullable Enumeration headerValues);
Request addCookie(String cookieName, String cookieValue);
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Response.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Response.java
index e87a517a8a..43a4457dab 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Response.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/Response.java
@@ -40,5 +40,7 @@ public interface Response {
Response withHeadersSent(boolean headersSent);
+ Response addHeader(String headerName, @Nullable String headerValue);
+
Response addHeader(String headerName, @Nullable Collection headerValues);
}
From 4858631fb5ddc91569eb31101304c03e52b56c61 Mon Sep 17 00:00:00 2001
From: Rafael Winterhalter
Date: Tue, 12 Mar 2024 22:20:38 +0100
Subject: [PATCH 013/132] Introduce API for metrics collection that does not
depend on agent-core (#3522)
* Remove logging API.
* Clean up core dependencies from POMs that do not need it.
* Add API for handling lambda instrumentation and apply to the AWS plugin.
* Move metrics API to tracer.
* Factor out JSON DSL for metrics.
* Fix import issue.
* Fix imports.
* Fix imports.
* fix formatting
---------
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
apm-agent-core/pom.xml | 5 -
...InstrumentationStatsLifecycleListener.java | 6 +-
.../apm/agent/collections/WeakMapCleaner.java | 6 +-
.../ApmServerConfigurationSource.java | 9 +-
.../apm/agent/configuration/StartupInfo.java | 7 +-
.../ClosableLifecycleListenerAdapter.java | 9 +-
.../apm/agent/impl/ElasticApmTracer.java | 35 ++++-
.../agent/impl/ElasticApmTracerBuilder.java | 2 +-
.../impl/circuitbreaker/CircuitBreaker.java | 9 +-
.../impl/circuitbreaker/GCStressMonitor.java | 3 +-
.../impl/circuitbreaker/StressMonitor.java | 4 +-
.../SystemCpuStressMonitor.java | 4 +-
.../agent/impl/transaction/Transaction.java | 2 +-
.../agent/logging/ApmServerLogAppender.java | 9 +-
.../apm/agent/metrics/MetricCollector.java | 2 +
.../apm/agent/metrics/MetricRegistry.java | 2 +
.../elastic/apm/agent/metrics/MetricSet.java | 2 +
.../metrics/builtin/AgentOverheadMetrics.java | 9 +-
.../metrics/builtin/AgentReporterMetrics.java | 2 +-
.../agent/metrics/builtin/CGroupMetrics.java | 11 +-
.../agent/metrics/builtin/JvmFdMetrics.java | 11 +-
.../agent/metrics/builtin/JvmGcMetrics.java | 11 +-
.../metrics/builtin/JvmMemoryMetrics.java | 11 +-
.../agent/metrics/builtin/SystemMetrics.java | 11 +-
.../agent/metrics/builtin/ThreadMetrics.java | 11 +-
.../report/serialize/DslJsonSerializer.java | 148 +++++++-----------
.../serialize/MetricRegistryReporter.java | 11 +-
.../serialize/MetricRegistrySerializer.java | 9 +-
.../serialize/SerializationConstants.java | 3 +-
...lastic.apm.agent.tracer.LifecycleListener} | 0
.../apm/agent/impl/ElasticApmTracerTest.java | 2 +-
.../elastic/apm/agent/impl/LifecycleTest.java | 10 +-
.../apm/agent/impl/SpanTypeBreakdownTest.java | 2 +-
.../apm/agent/metrics/MetricRegistryTest.java | 2 +
.../builtin/AgentOverheadMetricsTest.java | 2 +-
.../builtin/AgentReporterMetricsTest.java | 2 +-
.../metrics/builtin/CGroupMetricsTest.java | 2 +-
.../metrics/builtin/JvmFdMetricsTest.java | 2 +-
.../metrics/builtin/JvmMemoryMetricsTest.java | 2 +-
.../metrics/builtin/SystemMetricsTest.java | 2 +-
.../metrics/builtin/ThreadMetricsTest.java | 2 +-
.../serialize/MetricSetSerializationTest.java | 2 +-
...lastic.apm.agent.tracer.LifecycleListener} | 0
apm-agent-plugins/apm-jmx-plugin/pom.xml | 9 --
.../co/elastic/apm/agent/jmx/JmxMetric.java | 3 +-
.../apm/agent/jmx/JmxMetricTracker.java | 35 ++---
...lastic.apm.agent.tracer.LifecycleListener} | 0
.../apm/agent/jmx/JmxMetricTrackerTest.java | 2 +-
.../apm-micrometer-plugin/pom.xml | 6 -
.../AbstractMicrometerInstrumentation.java | 3 +-
.../MicrometerMeterRegistrySerializer.java | 16 +-
.../micrometer/MicrometerMetricsReporter.java | 20 +--
.../embeddedotel/EmbeddedSdkManager.java | 8 +-
...lastic.apm.agent.tracer.LifecycleListener} | 0
.../otelmetricsdk/MetricSetSerializer.java | 12 +-
.../apm/agent/profiler/ProfilingFactory.java | 8 +-
.../apm/agent/profiler/SamplingProfiler.java | 5 +-
...lastic.apm.agent.tracer.LifecycleListener} | 0
apm-agent-tracer/pom.xml | 5 +
.../tracer}/AbstractLifecycleListener.java | 8 +-
.../apm/agent/tracer/GlobalTracer.java | 35 +++++
.../apm/agent/tracer}/LifecycleListener.java | 36 ++---
.../elastic/apm/agent/tracer/NoopTracer.java | 29 +++-
.../co/elastic/apm/agent/tracer/Tracer.java | 16 ++
.../agent/tracer}/metrics/DoubleSupplier.java | 2 +-
.../apm/agent/tracer/metrics/DslJsonUtil.java | 80 ++++++++++
.../apm/agent/tracer}/metrics/Labels.java | 6 +-
.../apm/agent/tracer}/metrics/LabelsTest.java | 2 +-
68 files changed, 444 insertions(+), 298 deletions(-)
rename apm-agent-core/src/main/resources/META-INF/services/{co.elastic.apm.agent.context.LifecycleListener => co.elastic.apm.agent.tracer.LifecycleListener} (100%)
rename apm-agent-core/src/test/resources/META-INF/services/{co.elastic.apm.agent.context.LifecycleListener => co.elastic.apm.agent.tracer.LifecycleListener} (100%)
rename apm-agent-plugins/apm-jmx-plugin/src/main/resources/META-INF/services/{co.elastic.apm.agent.context.LifecycleListener => co.elastic.apm.agent.tracer.LifecycleListener} (100%)
rename apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/resources/META-INF/services/{co.elastic.apm.agent.context.LifecycleListener => co.elastic.apm.agent.tracer.LifecycleListener} (100%)
rename apm-agent-plugins/apm-profiling-plugin/src/main/resources/META-INF/services/{co.elastic.apm.agent.context.LifecycleListener => co.elastic.apm.agent.tracer.LifecycleListener} (100%)
rename {apm-agent-core/src/main/java/co/elastic/apm/agent/context => apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer}/AbstractLifecycleListener.java (83%)
rename {apm-agent-core/src/main/java/co/elastic/apm/agent/context => apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer}/LifecycleListener.java (74%)
rename {apm-agent-core/src/main/java/co/elastic/apm/agent => apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer}/metrics/DoubleSupplier.java (94%)
create mode 100644 apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DslJsonUtil.java
rename {apm-agent-core/src/main/java/co/elastic/apm/agent => apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer}/metrics/Labels.java (98%)
rename {apm-agent-core/src/test/java/co/elastic/apm/agent => apm-agent-tracer/src/test/java/co/elastic/apm/agent/tracer}/metrics/LabelsTest.java (99%)
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index 52c81eda23..a3ed72483d 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -149,11 +149,6 @@
${version.jetty-server}
test
-
- com.dslplatform
- dsl-json
- 1.9.3
-
commons-math
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/InstrumentationStatsLifecycleListener.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/InstrumentationStatsLifecycleListener.java
index a7f096ad59..c16d18c80d 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/InstrumentationStatsLifecycleListener.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/InstrumentationStatsLifecycleListener.java
@@ -19,10 +19,10 @@
package co.elastic.apm.agent.bci;
import co.elastic.apm.agent.bci.bytebuddy.MatcherTimer;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Tracer;
import java.util.ArrayList;
import java.util.Collections;
@@ -31,7 +31,7 @@ public class InstrumentationStatsLifecycleListener extends AbstractLifecycleList
private static final Logger logger = LoggerFactory.getLogger(InstrumentationStatsLifecycleListener.class);
@Override
- public void init(ElasticApmTracer tracer) {
+ public void init(Tracer tracer) {
InstrumentationStats instrumentationStats = ElasticApmAgent.getInstrumentationStats();
instrumentationStats.reset();
instrumentationStats.setMeasureMatching(logger.isDebugEnabled());
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/collections/WeakMapCleaner.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/collections/WeakMapCleaner.java
index 3755d8b26b..be6ea5fd98 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/collections/WeakMapCleaner.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/collections/WeakMapCleaner.java
@@ -18,8 +18,8 @@
*/
package co.elastic.apm.agent.collections;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.util.ExecutorUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -41,7 +41,7 @@ public WeakMapCleaner() {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) {
scheduler.scheduleWithFixedDelay(this, 1, 1, TimeUnit.SECONDS);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
index 662810e4b7..0f63ac2d0c 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
@@ -18,12 +18,13 @@
*/
package co.elastic.apm.agent.configuration;
-import co.elastic.apm.agent.context.LifecycleListener;
+import co.elastic.apm.agent.tracer.LifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.report.ApmServerClient;
import co.elastic.apm.agent.report.serialize.DslJsonSerializer;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.util.ExecutorUtils;
import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonReader;
@@ -111,17 +112,17 @@ public void reload() {
}
@Override
- public void init(ElasticApmTracer tracer) throws Exception {
+ public void init(Tracer tracer) throws Exception {
// noop
}
@Override
- public void start(final ElasticApmTracer tracer) {
+ public void start(final Tracer tracer) {
threadPool = ExecutorUtils.createSingleThreadDaemonPool("remote-config-poller", 1);
threadPool.execute(new Runnable() {
@Override
public void run() {
- pollConfig(tracer.getConfigurationRegistry());
+ pollConfig(tracer.require(ElasticApmTracer.class).getConfigurationRegistry());
}
});
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
index f75d4807ab..4de8761af2 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
@@ -18,8 +18,9 @@
*/
package co.elastic.apm.agent.configuration;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.configuration.TimeDuration;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
import co.elastic.apm.agent.util.VersionUtils;
@@ -56,8 +57,8 @@ private static String getJvmAndOsVersionString() {
}
@Override
- public void init(ElasticApmTracer tracer) {
- ConfigurationRegistry configurationRegistry = tracer.getConfigurationRegistry();
+ public void init(Tracer tracer) {
+ ConfigurationRegistry configurationRegistry = tracer.require(ElasticApmTracer.class).getConfigurationRegistry();
logConfiguration(configurationRegistry, logger);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/ClosableLifecycleListenerAdapter.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/context/ClosableLifecycleListenerAdapter.java
index 10ba08a7ed..d784743219 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/ClosableLifecycleListenerAdapter.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/context/ClosableLifecycleListenerAdapter.java
@@ -18,17 +18,18 @@
*/
package co.elastic.apm.agent.context;
-import java.io.Closeable;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.LifecycleListener;
public class ClosableLifecycleListenerAdapter extends AbstractLifecycleListener {
- private final Closeable closeable;
+ private final AutoCloseable closeable;
- public static LifecycleListener of(Closeable closeable) {
+ public static LifecycleListener of(AutoCloseable closeable) {
return new ClosableLifecycleListenerAdapter(closeable);
}
- private ClosableLifecycleListenerAdapter(Closeable closeable) {
+ private ClosableLifecycleListenerAdapter(AutoCloseable closeable) {
this.closeable = closeable;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
index 08cb977c59..711601c319 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
@@ -35,11 +35,13 @@
import co.elastic.apm.agent.impl.metadata.NameAndIdField;
import co.elastic.apm.agent.impl.metadata.ServiceFactory;
import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.service.Service;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
import co.elastic.apm.agent.configuration.SpanConfiguration;
import co.elastic.apm.agent.context.ClosableLifecycleListenerAdapter;
-import co.elastic.apm.agent.context.LifecycleListener;
+import co.elastic.apm.agent.tracer.LifecycleListener;
import co.elastic.apm.agent.impl.baggage.Baggage;
import co.elastic.apm.agent.impl.baggage.W3CBaggagePropagation;
import co.elastic.apm.agent.impl.error.ErrorCapture;
@@ -71,12 +73,12 @@
import co.elastic.apm.agent.tracer.reference.ReferenceCountedMap;
import co.elastic.apm.agent.util.DependencyInjectingServiceLoader;
import co.elastic.apm.agent.util.ExecutorUtils;
+import com.dslplatform.json.JsonWriter;
import org.stagemonitor.configuration.ConfigurationOption;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
import org.stagemonitor.configuration.ConfigurationRegistry;
import javax.annotation.Nullable;
-import java.io.Closeable;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@@ -954,7 +956,8 @@ public ScheduledThreadPoolExecutor getSharedSingleThreadedPool() {
return sharedPool;
}
- public void addShutdownHook(Closeable closeable) {
+ @Override
+ public void addShutdownHook(AutoCloseable closeable) {
lifecycleListeners.add(ClosableLifecycleListenerAdapter.of(closeable));
}
@@ -1044,4 +1047,30 @@ public void completeMetaData(String name, String version, String id, String regi
region
));
}
+
+ @Override
+ public void removeGauge(String name, Labels.Immutable labels) {
+ metricRegistry.removeGauge(name, labels);
+ }
+
+ @Override
+ public void addGauge(String name, Labels.Immutable labels, DoubleSupplier supplier) {
+ metricRegistry.add(name, labels, supplier);
+ }
+
+ @Override
+ public void submit(Runnable job) {
+ sharedPool.submit(job);
+ }
+
+ @Override
+ public void schedule(Runnable job, long interval, TimeUnit timeUnit) {
+ sharedPool.scheduleAtFixedRate(job, 0, interval, timeUnit);
+ }
+
+ @Override
+ public void reportMetric(JsonWriter metrics) {
+ reporter.reportMetrics(metrics);
+ }
+
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
index 86c93a3353..b68faae5dd 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
@@ -26,7 +26,7 @@
import co.elastic.apm.agent.configuration.source.ConfigSources;
import co.elastic.apm.agent.configuration.source.SystemPropertyConfigurationSource;
import co.elastic.apm.agent.context.ClosableLifecycleListenerAdapter;
-import co.elastic.apm.agent.context.LifecycleListener;
+import co.elastic.apm.agent.tracer.LifecycleListener;
import co.elastic.apm.agent.impl.metadata.MetaData;
import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/CircuitBreaker.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/CircuitBreaker.java
index f17e20876c..b90c539011 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/CircuitBreaker.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/CircuitBreaker.java
@@ -18,8 +18,9 @@
*/
package co.elastic.apm.agent.impl.circuitbreaker;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.util.ExecutorUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -50,7 +51,7 @@ public CircuitBreaker(ElasticApmTracer tracer) {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) {
// failsafe loading of stress monitors in isolation
loadGCStressMonitor(tracer);
loadSystemCpuStressMonitor(tracer);
@@ -63,7 +64,7 @@ public void run() {
});
}
- private void loadGCStressMonitor(ElasticApmTracer tracer) {
+ private void loadGCStressMonitor(Tracer tracer) {
try {
stressMonitors.add(new GCStressMonitor(tracer));
} catch (Throwable throwable) {
@@ -71,7 +72,7 @@ private void loadGCStressMonitor(ElasticApmTracer tracer) {
}
}
- private void loadSystemCpuStressMonitor(ElasticApmTracer tracer) {
+ private void loadSystemCpuStressMonitor(Tracer tracer) {
try {
stressMonitors.add(new SystemCpuStressMonitor(tracer));
} catch (Throwable throwable) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/GCStressMonitor.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/GCStressMonitor.java
index 62405dadd6..a325e2632b 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/GCStressMonitor.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/GCStressMonitor.java
@@ -21,6 +21,7 @@
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Tracer;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
@@ -35,7 +36,7 @@ class GCStressMonitor extends StressMonitor {
private final List heapMBeans = new ArrayList<>();
private final StringBuilder latestStressDetectionInfo = new StringBuilder("No stress has been detected so far.");
- GCStressMonitor(ElasticApmTracer tracer) {
+ GCStressMonitor(Tracer tracer) {
super(tracer);
discoverMBeans();
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/StressMonitor.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/StressMonitor.java
index 992bb89344..a6db804364 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/StressMonitor.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/StressMonitor.java
@@ -18,13 +18,13 @@
*/
package co.elastic.apm.agent.impl.circuitbreaker;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.Tracer;
abstract class StressMonitor {
protected final CircuitBreakerConfiguration circuitBreakerConfiguration;
- public StressMonitor(ElasticApmTracer tracer) {
+ public StressMonitor(Tracer tracer) {
circuitBreakerConfiguration = tracer.getConfig(CircuitBreakerConfiguration.class);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/SystemCpuStressMonitor.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/SystemCpuStressMonitor.java
index cb0b6536aa..fd0d5e8fe6 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/SystemCpuStressMonitor.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/circuitbreaker/SystemCpuStressMonitor.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.impl.circuitbreaker;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.util.JmxUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -45,7 +45,7 @@ public class SystemCpuStressMonitor extends StressMonitor {
@Nullable
private final Method systemCpuUsageMethod;
- SystemCpuStressMonitor(ElasticApmTracer tracer) {
+ SystemCpuStressMonitor(Tracer tracer) {
super(tracer);
operatingSystemBean = ManagementFactory.getOperatingSystemMXBean();
systemCpuUsageMethod = JmxUtils.getOperatingSystemMBeanMethod(operatingSystemBean, "getSystemCpuLoad");
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
index aab38dddd2..ff3ca395c7 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
@@ -27,7 +27,7 @@
import co.elastic.apm.agent.impl.context.Response;
import co.elastic.apm.agent.impl.context.TransactionContext;
import co.elastic.apm.agent.impl.sampling.Sampler;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.Timer;
import co.elastic.apm.agent.tracer.Outcome;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/logging/ApmServerLogAppender.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/logging/ApmServerLogAppender.java
index 59328be609..97074fe210 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/logging/ApmServerLogAppender.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/logging/ApmServerLogAppender.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.logging;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
-import co.elastic.apm.agent.context.LifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.LifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.report.Reporter;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.logging.log4j2.EcsLayout;
import org.apache.logging.log4j.core.Appender;
import org.apache.logging.log4j.core.Core;
@@ -103,8 +104,8 @@ public void append(LogEvent event) {
public LifecycleListener getInitListener() {
return new AbstractLifecycleListener() {
@Override
- public void init(ElasticApmTracer tracer) throws Exception {
- initStreaming(tracer.getConfig(LoggingConfiguration.class), tracer.getReporter());
+ public void init(Tracer tracer) throws Exception {
+ initStreaming(tracer.getConfig(LoggingConfiguration.class), tracer.require(ElasticApmTracer.class).getReporter());
}
};
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricCollector.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricCollector.java
index b8ccd561f4..199899b787 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricCollector.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricCollector.java
@@ -18,6 +18,8 @@
*/
package co.elastic.apm.agent.metrics;
+import co.elastic.apm.agent.tracer.metrics.Labels;
+
public interface MetricCollector {
void addMetricValue(String metric, Labels labels, double value);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java
index 2df93faa7f..9c1cdeb285 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricRegistry.java
@@ -23,6 +23,8 @@
import co.elastic.apm.agent.report.ReporterConfiguration;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import org.HdrHistogram.WriterReaderPhaser;
import javax.annotation.Nonnull;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricSet.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricSet.java
index 474a3827be..8bb1bc6f85 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricSet.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/MetricSet.java
@@ -18,6 +18,8 @@
*/
package co.elastic.apm.agent.metrics;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetrics.java
index c0a06ab921..3413f95f8a 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetrics.java
@@ -19,9 +19,10 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricCollector;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricsProvider;
@@ -113,8 +114,8 @@ public AgentOverheadMetrics() {
}
@Override
- public void start(ElasticApmTracer tracer) throws Exception {
- MetricRegistry metricRegistry = tracer.getMetricRegistry();
+ public void start(Tracer tracer) throws Exception {
+ MetricRegistry metricRegistry = tracer.require(ElasticApmTracer.class).getMetricRegistry();
MetricsConfiguration config = tracer.getConfig(MetricsConfiguration.class);
bindTo(metricRegistry, config);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetrics.java
index 6970d114ae..e946bb90e1 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetrics.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricCollector;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricsProvider;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/CGroupMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/CGroupMetrics.java
index 9f64ed14cc..e89ee39ef5 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/CGroupMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/CGroupMetrics.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -213,8 +214,8 @@ private File getMaxMemoryFile(File maxMemoryFile, String cgroupUnlimitedConstant
}
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(MetricRegistry metricRegistry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetrics.java
index 4a0764fe35..08d95586bf 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetrics.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import javax.annotation.Nullable;
@@ -40,8 +41,8 @@ public class JvmFdMetrics extends AbstractLifecycleListener {
private static final MethodHandle getMaxFileDescriptorCount = getMethodHandle("getMaxFileDescriptorCount");
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(final MetricRegistry registry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmGcMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmGcMetrics.java
index 4cd140aced..089c2df2d0 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmGcMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmGcMetrics.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import com.sun.management.ThreadMXBean;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
@@ -35,8 +36,8 @@ public class JvmGcMetrics extends AbstractLifecycleListener {
private final List garbageCollectorMXBeans = ManagementFactory.getGarbageCollectorMXBeans();
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(final MetricRegistry registry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetrics.java
index b83fbf2eff..272c1e7a31 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetrics.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -36,8 +37,8 @@ public class JvmMemoryMetrics extends AbstractLifecycleListener {
private static final Logger logger = LoggerFactory.getLogger(JvmMemoryMetrics.class);
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(final MetricRegistry registry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/SystemMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/SystemMetrics.java
index 3659938a5f..a6e79439d8 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/SystemMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/SystemMetrics.java
@@ -18,11 +18,12 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.util.JmxUtils;
import org.stagemonitor.util.StringUtils;
@@ -88,8 +89,8 @@ public SystemMetrics() {
}
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(MetricRegistry metricRegistry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/ThreadMetrics.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/ThreadMetrics.java
index 52c5203555..cf3314c0ea 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/ThreadMetrics.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/ThreadMetrics.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.metrics.builtin;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import java.lang.management.ManagementFactory;
@@ -30,8 +31,8 @@
public class ThreadMetrics extends AbstractLifecycleListener {
@Override
- public void start(ElasticApmTracer tracer) {
- bindTo(tracer.getMetricRegistry());
+ public void start(Tracer tracer) {
+ bindTo(tracer.require(ElasticApmTracer.class).getMetricRegistry());
}
void bindTo(final MetricRegistry registry) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
index 6ec3676c4b..e56bb1b1e3 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
@@ -59,13 +59,14 @@
import co.elastic.apm.agent.impl.transaction.StackFrame;
import co.elastic.apm.agent.impl.transaction.TraceContext;
import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.report.ApmServerClient;
import co.elastic.apm.agent.sdk.internal.collections.LongList;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
+import co.elastic.apm.agent.tracer.metrics.DslJsonUtil;
import com.dslplatform.json.BoolConverter;
import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonWriter;
@@ -98,7 +99,6 @@ public class DslJsonSerializer {
private static final byte NEW_LINE = (byte) '\n';
private static final Logger logger = LoggerFactory.getLogger(DslJsonSerializer.class);
- private static final String[] DISALLOWED_IN_PROPERTY_NAME = new String[]{".", "*", "\""};
private static final List excludedStackFramesPrefixes = Arrays.asList("java.lang.reflect.", "com.sun.", "sun.", "jdk.internal.");
@@ -165,16 +165,16 @@ static void serializeMetadata(MetaData metaData,
private static void serializeGlobalLabels(ArrayList globalLabelKeys, ArrayList globalLabelValues,
final StringBuilder replaceBuilder, JsonWriter jw) {
if (!globalLabelKeys.isEmpty()) {
- writeFieldName("labels", jw);
+ DslJsonUtil.writeFieldName("labels", jw);
jw.writeByte(OBJECT_START);
- writeStringValue(sanitizePropertyName(globalLabelKeys.get(0), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(globalLabelKeys.get(0), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
- writeStringValue(globalLabelValues.get(0), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(globalLabelValues.get(0), replaceBuilder, jw);
for (int i = 1; i < globalLabelKeys.size(); i++) {
jw.writeByte(COMMA);
- writeStringValue(sanitizePropertyName(globalLabelKeys.get(i), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(globalLabelKeys.get(i), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
- writeStringValue(globalLabelValues.get(i), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(globalLabelValues.get(i), replaceBuilder, jw);
}
jw.writeByte(OBJECT_END);
jw.writeByte(COMMA);
@@ -182,7 +182,7 @@ private static void serializeGlobalLabels(ArrayList globalLabelKeys, Arr
}
private static void serializeService(final Service service, final StringBuilder replaceBuilder, final JsonWriter jw, boolean supportsAgentActivationMethod) {
- writeFieldName("service", jw);
+ DslJsonUtil.writeFieldName("service", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeField("name", service.getName(), replaceBuilder, jw);
@@ -224,17 +224,17 @@ private static void serializeService(@Nullable final CharSequence serviceName, @
return;
}
- writeFieldName("service", jw);
+ DslJsonUtil.writeFieldName("service", jw);
jw.writeByte(OBJECT_START);
if (serviceName != null) {
- writeFieldName("name", jw);
- writeStringValue(serviceName, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("name", jw);
+ DslJsonUtil.writeStringValue(serviceName, replaceBuilder, jw);
if (serviceVersion != null) {
jw.writeByte(COMMA);
- writeFieldName("version", jw);
- writeStringValue(serviceVersion, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("version", jw);
+ DslJsonUtil.writeStringValue(serviceVersion, replaceBuilder, jw);
}
}
@@ -242,22 +242,22 @@ private static void serializeService(@Nullable final CharSequence serviceName, @
if (serviceName != null) {
jw.writeByte(COMMA);
}
- writeFieldName("target", jw);
+ DslJsonUtil.writeFieldName("target", jw);
jw.writeByte(OBJECT_START);
CharSequence targetType = serviceTarget.getType();
CharSequence targetName = serviceTarget.getName();
if (targetType != null) {
- writeFieldName("type", jw);
- writeStringValue(targetType, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("type", jw);
+ DslJsonUtil.writeStringValue(targetType, replaceBuilder, jw);
}
if (targetName != null) {
if (targetType != null) {
jw.writeByte(COMMA);
}
- writeFieldName("name", jw);
- writeStringValue(targetName, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("name", jw);
+ DslJsonUtil.writeStringValue(targetName, replaceBuilder, jw);
}
jw.writeByte(OBJECT_END);
@@ -271,7 +271,7 @@ private static void serializeService(@Nullable String name, @Nullable String ver
}
private static void serializeAgent(final Agent agent, final StringBuilder replaceBuilder, final JsonWriter jw, boolean supportsAgentActivationMethod) {
- writeFieldName("agent", jw);
+ DslJsonUtil.writeFieldName("agent", jw);
jw.writeByte(JsonWriter.OBJECT_START);
if (supportsAgentActivationMethod) {
writeField("activation_method", agent.getActivationMethod(), replaceBuilder, jw);
@@ -284,7 +284,7 @@ private static void serializeAgent(final Agent agent, final StringBuilder replac
}
private static void serializeLanguage(final Language language, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("language", jw);
+ DslJsonUtil.writeFieldName("language", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeField("name", language.getName(), replaceBuilder, jw);
writeLastField("version", language.getVersion(), replaceBuilder, jw);
@@ -293,7 +293,7 @@ private static void serializeLanguage(final Language language, final StringBuild
}
private static void serializeFramework(final Framework framework, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("framework", jw);
+ DslJsonUtil.writeFieldName("framework", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeField("name", framework.getName(), replaceBuilder, jw);
writeLastField("version", framework.getVersion(), replaceBuilder, jw);
@@ -302,7 +302,7 @@ private static void serializeFramework(final Framework framework, final StringBu
}
private static void serializeNode(final Node node, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("node", jw);
+ DslJsonUtil.writeFieldName("node", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeLastField("configured_name", node.getName(), replaceBuilder, jw);
jw.writeByte(JsonWriter.OBJECT_END);
@@ -310,7 +310,7 @@ private static void serializeNode(final Node node, final StringBuilder replaceBu
}
private static void serializeRuntime(final RuntimeInfo runtime, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("runtime", jw);
+ DslJsonUtil.writeFieldName("runtime", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeField("name", runtime.getName(), replaceBuilder, jw);
writeLastField("version", runtime.getVersion(), replaceBuilder, jw);
@@ -319,7 +319,7 @@ private static void serializeRuntime(final RuntimeInfo runtime, final StringBuil
}
private static void serializeProcess(final ProcessInfo process, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("process", jw);
+ DslJsonUtil.writeFieldName("process", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeField("pid", process.getPid(), jw);
if (process.getPpid() != null) {
@@ -337,7 +337,7 @@ private static void serializeSystem(SystemInfo system,
JsonWriter jw,
boolean supportsConfiguredAndDetectedHostname) {
- writeFieldName("system", jw);
+ DslJsonUtil.writeFieldName("system", jw);
jw.writeByte(JsonWriter.OBJECT_START);
serializeContainerInfo(system.getContainerInfo(), replaceBuilder, jw);
serializeKubernetesInfo(system.getKubernetesInfo(), replaceBuilder, jw);
@@ -360,13 +360,13 @@ private static void serializeSystem(SystemInfo system,
}
private static void serializeCloudProvider(final CloudProviderInfo cloudProviderInfo, final StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName("cloud", jw);
+ DslJsonUtil.writeFieldName("cloud", jw);
jw.writeByte(OBJECT_START);
serializeNameAndIdField(cloudProviderInfo.getAccount(), "account", replaceBuilder, jw);
serializeNameAndIdField(cloudProviderInfo.getInstance(), "instance", replaceBuilder, jw);
serializeNameAndIdField(cloudProviderInfo.getProject(), "project", replaceBuilder, jw);
if (cloudProviderInfo.getMachine() != null) {
- writeFieldName("machine", jw);
+ DslJsonUtil.writeFieldName("machine", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeLastField("type", cloudProviderInfo.getMachine().getType(), replaceBuilder, jw);
jw.writeByte(JsonWriter.OBJECT_END);
@@ -375,7 +375,7 @@ private static void serializeCloudProvider(final CloudProviderInfo cloudProvider
writeField("availability_zone", cloudProviderInfo.getAvailabilityZone(), replaceBuilder, jw);
writeField("region", cloudProviderInfo.getRegion(), replaceBuilder, jw);
if (null != cloudProviderInfo.getService()) {
- writeFieldName("service", jw);
+ DslJsonUtil.writeFieldName("service", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeLastField("name", cloudProviderInfo.getService().getName(), replaceBuilder, jw);
jw.writeByte(JsonWriter.OBJECT_END);
@@ -388,13 +388,13 @@ private static void serializeCloudProvider(final CloudProviderInfo cloudProvider
private static void serializeNameAndIdField(@Nullable NameAndIdField nameAndIdField, String fieldName,
StringBuilder replaceBuilder, JsonWriter jw) {
if (nameAndIdField != null && !nameAndIdField.isEmpty()) {
- writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
jw.writeByte(JsonWriter.OBJECT_START);
boolean idWritten = false;
String id = nameAndIdField.getId();
if (id != null) {
- writeFieldName("id", jw);
- writeStringValue(id, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("id", jw);
+ DslJsonUtil.writeStringValue(id, replaceBuilder, jw);
idWritten = true;
}
String name = nameAndIdField.getName();
@@ -402,8 +402,8 @@ private static void serializeNameAndIdField(@Nullable NameAndIdField nameAndIdFi
if (idWritten) {
jw.writeByte(COMMA);
}
- writeFieldName("name", jw);
- writeStringValue(name, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName("name", jw);
+ DslJsonUtil.writeStringValue(name, replaceBuilder, jw);
}
jw.writeByte(JsonWriter.OBJECT_END);
jw.writeByte(COMMA);
@@ -412,7 +412,7 @@ private static void serializeNameAndIdField(@Nullable NameAndIdField nameAndIdFi
private static void serializeContainerInfo(@Nullable SystemInfo.Container container, final StringBuilder replaceBuilder, final JsonWriter jw) {
if (container != null) {
- writeFieldName("container", jw);
+ DslJsonUtil.writeFieldName("container", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeLastField("id", container.getId(), replaceBuilder, jw);
jw.writeByte(JsonWriter.OBJECT_END);
@@ -422,7 +422,7 @@ private static void serializeContainerInfo(@Nullable SystemInfo.Container contai
private static void serializeKubernetesInfo(@Nullable SystemInfo.Kubernetes kubernetes, final StringBuilder replaceBuilder, final JsonWriter jw) {
if (kubernetes != null && kubernetes.hasContent()) {
- writeFieldName("kubernetes", jw);
+ DslJsonUtil.writeFieldName("kubernetes", jw);
jw.writeByte(JsonWriter.OBJECT_START);
serializeKubeNodeInfo(kubernetes.getNode(), replaceBuilder, jw);
serializeKubePodInfo(kubernetes.getPod(), replaceBuilder, jw);
@@ -434,7 +434,7 @@ private static void serializeKubernetesInfo(@Nullable SystemInfo.Kubernetes kube
private static void serializeKubePodInfo(@Nullable SystemInfo.Kubernetes.Pod pod, final StringBuilder replaceBuilder, final JsonWriter jw) {
if (pod != null) {
- writeFieldName("pod", jw);
+ DslJsonUtil.writeFieldName("pod", jw);
jw.writeByte(JsonWriter.OBJECT_START);
String podName = pod.getName();
if (podName != null) {
@@ -448,7 +448,7 @@ private static void serializeKubePodInfo(@Nullable SystemInfo.Kubernetes.Pod pod
private static void serializeKubeNodeInfo(@Nullable SystemInfo.Kubernetes.Node node, final StringBuilder replaceBuilder, final JsonWriter jw) {
if (node != null) {
- writeFieldName("node", jw);
+ DslJsonUtil.writeFieldName("node", jw);
jw.writeByte(JsonWriter.OBJECT_START);
writeLastField("name", node.getName(), replaceBuilder, jw);
jw.writeByte(JsonWriter.OBJECT_END);
@@ -476,13 +476,13 @@ private static void serializeStringKeyScalarValueMap(Iterator extends Map.Entr
jw.writeByte(OBJECT_START);
if (it.hasNext()) {
Map.Entry kv = it.next();
- writeStringValue(sanitizePropertyName(kv.getKey(), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(kv.getKey(), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
serializeScalarValue(replaceBuilder, jw, kv.getValue(), extendedStringLimit, supportsNonStringValues);
while (it.hasNext()) {
jw.writeByte(COMMA);
kv = it.next();
- writeStringValue(sanitizePropertyName(kv.getKey(), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(kv.getKey(), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
serializeScalarValue(replaceBuilder, jw, kv.getValue(), extendedStringLimit, supportsNonStringValues);
}
@@ -498,7 +498,7 @@ static void serializeLabels(Labels labels, final String serviceName, final Strin
}
if (!labels.isEmpty()) {
if (labels.getTransactionName() != null || labels.getTransactionType() != null) {
- writeFieldName("transaction", jw);
+ DslJsonUtil.writeFieldName("transaction", jw);
jw.writeByte(OBJECT_START);
writeField("name", labels.getTransactionName(), replaceBuilder, jw);
writeLastField("type", labels.getTransactionType(), replaceBuilder, jw);
@@ -507,7 +507,7 @@ static void serializeLabels(Labels labels, final String serviceName, final Strin
}
if (labels.getSpanType() != null || labels.getSpanSubType() != null) {
- writeFieldName("span", jw);
+ DslJsonUtil.writeFieldName("span", jw);
jw.writeByte(OBJECT_START);
writeField("type", labels.getSpanType(), replaceBuilder, jw);
writeLastField("subtype", labels.getSpanSubType(), replaceBuilder, jw);
@@ -515,7 +515,7 @@ static void serializeLabels(Labels labels, final String serviceName, final Strin
jw.writeByte(COMMA);
}
- writeFieldName("tags", jw);
+ DslJsonUtil.writeFieldName("tags", jw);
jw.writeByte(OBJECT_START);
serialize(labels, replaceBuilder, jw);
jw.writeByte(OBJECT_END);
@@ -528,7 +528,7 @@ private static void serialize(Labels labels, final StringBuilder replaceBuilder,
if (i > 0) {
jw.writeByte(COMMA);
}
- writeStringValue(sanitizePropertyName(labels.getKey(i), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(labels.getKey(i), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
serializeScalarValue(replaceBuilder, jw, labels.getValue(i), false, false);
}
@@ -539,7 +539,7 @@ private static void serializeScalarValue(final StringBuilder replaceBuilder, fin
if (extendedStringLimit) {
writeLongStringValue((String) value, replaceBuilder, jw);
} else {
- writeStringValue((String) value, replaceBuilder, jw);
+ DslJsonUtil.writeStringValue((String) value, replaceBuilder, jw);
}
} else if (value instanceof Number) {
if (supportsNonStringValues) {
@@ -559,25 +559,6 @@ private static void serializeScalarValue(final StringBuilder replaceBuilder, fin
}
}
- public static CharSequence sanitizePropertyName(String key, StringBuilder replaceBuilder) {
- for (int i = 0; i < DISALLOWED_IN_PROPERTY_NAME.length; i++) {
- if (key.contains(DISALLOWED_IN_PROPERTY_NAME[i])) {
- return replaceAll(key, DISALLOWED_IN_PROPERTY_NAME, "_", replaceBuilder);
- }
- }
- return key;
- }
-
- private static CharSequence replaceAll(String s, String[] stringsToReplace, String replacement, StringBuilder replaceBuilder) {
- // uses a instance variable StringBuilder to avoid allocations
- replaceBuilder.setLength(0);
- replaceBuilder.append(s);
- for (String toReplace : stringsToReplace) {
- replace(replaceBuilder, toReplace, replacement, 0);
- }
- return replaceBuilder;
- }
-
static void replace(StringBuilder replaceBuilder, String toReplace, String replacement, int fromIndex) {
for (int i = replaceBuilder.indexOf(toReplace, fromIndex); i != -1; i = replaceBuilder.indexOf(toReplace, fromIndex)) {
replaceBuilder.replace(i, i + toReplace.length(), replacement);
@@ -601,13 +582,13 @@ static void writeField(final String fieldName,
if (value == null) {
if (writeNull) {
- writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
jw.writeNull();
jw.writeByte(COMMA);
}
} else {
- writeFieldName(fieldName, jw);
- writeStringValue(value, replaceBuilder, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
+ DslJsonUtil.writeStringValue(value, replaceBuilder, jw);
jw.writeByte(COMMA);
}
}
@@ -620,16 +601,6 @@ private static void writeStringBuilderValue(StringBuilder value, JsonWriter jw)
jw.writeString(value);
}
- public static void writeStringValue(CharSequence value, final StringBuilder replaceBuilder, final JsonWriter jw) {
- if (value.length() > SerializationConstants.MAX_VALUE_LENGTH) {
- replaceBuilder.setLength(0);
- replaceBuilder.append(value, 0, Math.min(value.length(), SerializationConstants.MAX_VALUE_LENGTH + 1));
- writeStringBuilderValue(replaceBuilder, jw);
- } else {
- jw.writeString(value);
- }
- }
-
private static void writeLongStringBuilderValue(StringBuilder value, JsonWriter jw) {
if (value.length() > SerializationConstants.getMaxLongStringValueLength()) {
value.setLength(SerializationConstants.getMaxLongStringValueLength() - 1);
@@ -649,30 +620,23 @@ private static void writeLongStringValue(CharSequence value, final StringBuilder
}
static void writeField(final String fieldName, final long value, final JsonWriter jw) {
- writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
NumberConverter.serialize(value, jw);
jw.writeByte(COMMA);
}
public static void writeLastField(final String fieldName, @Nullable final CharSequence value, StringBuilder replaceBuilder, final JsonWriter jw) {
- writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
if (value != null && value.length() > 0) {
- writeStringValue(value, replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(value, replaceBuilder, jw);
} else {
jw.writeNull();
}
}
- public static void writeFieldName(final String fieldName, final JsonWriter jw) {
- jw.writeByte(JsonWriter.QUOTE);
- jw.writeAscii(fieldName);
- jw.writeByte(JsonWriter.QUOTE);
- jw.writeByte(JsonWriter.SEMI);
- }
-
static void writeField(final String fieldName, final List values, final JsonWriter jw) {
if (values.size() > 0) {
- writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
jw.writeByte(ARRAY_START);
jw.writeString(values.get(0));
for (int i = 1; i < values.size(); i++) {
@@ -1142,7 +1106,7 @@ private void serializeNumber(Number n, JsonWriter jw) {
}
private void serializeComposite(Composite composite) {
- DslJsonSerializer.writeFieldName("composite", jw);
+ DslJsonUtil.writeFieldName("composite", jw);
jw.writeByte(OBJECT_START);
writeField("count", composite.getCount());
writeField("sum", composite.getSumMs());
@@ -1342,7 +1306,7 @@ private void serializeStackTraceElement(StackFrame frame, StringBuilder replaceB
frame.appendFileName(replaceBuilder);
writeField("filename", replaceBuilder);
writeField("function", frame.getMethodName());
- writeField("library_frame", isLibraryFrame(frame.getClassName()));
+ writeField("library_frame", frame.getClassName() != null && isLibraryFrame(frame.getClassName()));
writeLastField("lineno", -1);
jw.writeByte(OBJECT_END);
}
@@ -1675,7 +1639,7 @@ void serializeUrl(final Url url) {
} else {
// serialize as a string for compatibility
// doing it in low-level to avoid allocation
- DslJsonSerializer.writeFieldName("port", jw);
+ DslJsonUtil.writeFieldName("port", jw);
jw.writeByte(QUOTE);
NumberConverter.serialize(port, jw);
jw.writeByte(QUOTE);
@@ -1787,7 +1751,7 @@ private void writeStringBuilderValue(StringBuilder value) {
}
private void writeStringValue(CharSequence value) {
- DslJsonSerializer.writeStringValue(value, replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(value, replaceBuilder, jw);
}
private void writeLongStringValue(CharSequence value) {
@@ -1836,7 +1800,7 @@ void writeLastField(final String fieldName, @Nullable final CharSequence value)
}
private void writeFieldName(final String fieldName) {
- DslJsonSerializer.writeFieldName(fieldName, jw);
+ DslJsonUtil.writeFieldName(fieldName, jw);
}
private void writeNonLastIdField(String fieldName, Id id) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistryReporter.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistryReporter.java
index aa1a9347a9..04327f4f0f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistryReporter.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistryReporter.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.report.serialize;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricSet;
import co.elastic.apm.agent.report.Reporter;
@@ -47,10 +48,12 @@ public MetricRegistryReporter(ElasticApmTracer tracer) {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) {
long intervalMs = tracer.getConfig(ReporterConfiguration.class).getMetricsIntervalMs();
if (intervalMs > 0) {
- tracer.getSharedSingleThreadedPool().scheduleAtFixedRate(this, intervalMs, intervalMs, TimeUnit.MILLISECONDS);
+ tracer.require(ElasticApmTracer.class)
+ .getSharedSingleThreadedPool()
+ .scheduleAtFixedRate(this, intervalMs, intervalMs, TimeUnit.MILLISECONDS);
}
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistrySerializer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistrySerializer.java
index e5b3700f39..afcf9133e1 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistrySerializer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/MetricRegistrySerializer.java
@@ -19,9 +19,10 @@
package co.elastic.apm.agent.report.serialize;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
import co.elastic.apm.agent.metrics.MetricSet;
import co.elastic.apm.agent.metrics.Timer;
+import co.elastic.apm.agent.tracer.metrics.DslJsonUtil;
import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonWriter;
import com.dslplatform.json.NumberConverter;
@@ -80,14 +81,14 @@ private static boolean serialize(MetricSet metricSet, long epochMicros, String s
boolean hasSamples;
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("metricset", jw);
+ DslJsonUtil.writeFieldName("metricset", jw);
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("timestamp", jw);
+ DslJsonUtil.writeFieldName("timestamp", jw);
NumberConverter.serialize(epochMicros, jw);
jw.writeByte(JsonWriter.COMMA);
DslJsonSerializer.serializeLabels(metricSet.getLabels(), serviceName, serviceVersion, replaceBuilder, jw);
- DslJsonSerializer.writeFieldName("samples", jw);
+ DslJsonUtil.writeFieldName("samples", jw);
jw.writeByte(JsonWriter.OBJECT_START);
hasSamples = serializeGauges(metricSet.getGauges(), jw);
hasSamples |= serializeTimers(metricSet.getTimers(), hasSamples, jw);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/SerializationConstants.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/SerializationConstants.java
index 8f5e4d2db0..bd927d1b8f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/SerializationConstants.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/SerializationConstants.java
@@ -19,6 +19,7 @@
package co.elastic.apm.agent.report.serialize;
import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.tracer.metrics.DslJsonUtil;
import javax.annotation.Nullable;
@@ -31,7 +32,7 @@ public class SerializationConstants {
*/
public static final int BUFFER_SIZE = 16384;
- public static final int MAX_VALUE_LENGTH = 1024;
+ public static final int MAX_VALUE_LENGTH = DslJsonUtil.MAX_VALUE_LENGTH;
@Nullable
private static volatile SerializationConstants INSTANCE;
diff --git a/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener b/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
similarity index 100%
rename from apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
rename to apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
index b2771cfd8a..b365039737 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
@@ -34,7 +34,7 @@
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.impl.transaction.TraceContext;
import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.objectpool.TestObjectPoolFactory;
import co.elastic.apm.agent.report.ApmServerClient;
import co.elastic.apm.agent.tracer.Outcome;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/LifecycleTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/LifecycleTest.java
index 9ba0dbc469..ddf693bd5e 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/LifecycleTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/LifecycleTest.java
@@ -21,7 +21,7 @@
import co.elastic.apm.agent.MockReporter;
import co.elastic.apm.agent.bci.ElasticApmAgent;
import co.elastic.apm.agent.configuration.SpyConfiguration;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.objectpool.TestObjectPoolFactory;
import net.bytebuddy.agent.ByteBuddyAgent;
import org.junit.jupiter.api.AfterEach;
@@ -145,12 +145,12 @@ void testStartDisabled() throws Exception {
.reporter(new MockReporter())
.withLifecycleListener(new AbstractLifecycleListener() {
@Override
- public void init(ElasticApmTracer tracer) {
+ public void init(co.elastic.apm.agent.tracer.Tracer tracer) {
initialized.set(true);
}
@Override
- public void start(ElasticApmTracer tracer) throws Exception {
+ public void start(co.elastic.apm.agent.tracer.Tracer tracer) throws Exception {
started.set(true);
}
})
@@ -163,7 +163,7 @@ public void start(ElasticApmTracer tracer) throws Exception {
/*
* Has an entry in
- * src/test/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
+ * src/test/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
*/
public static class TestLifecycleListener extends AbstractLifecycleListener {
@@ -178,7 +178,7 @@ public TestLifecycleListener() {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(co.elastic.apm.agent.tracer.Tracer tracer) {
start.incrementAndGet();
}
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/SpanTypeBreakdownTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/SpanTypeBreakdownTest.java
index a090c71566..d8147bdf33 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/SpanTypeBreakdownTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/SpanTypeBreakdownTest.java
@@ -26,7 +26,7 @@
import co.elastic.apm.agent.impl.transaction.AbstractSpan;
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricSet;
import co.elastic.apm.agent.metrics.Timer;
import org.junit.jupiter.api.AfterEach;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/MetricRegistryTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/MetricRegistryTest.java
index 2b445c9e54..5590fea3cc 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/MetricRegistryTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/MetricRegistryTest.java
@@ -21,6 +21,8 @@
import co.elastic.apm.agent.configuration.MetricsConfiguration;
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetricsTest.java
index 814bc84cfc..093782f979 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentOverheadMetricsTest.java
@@ -20,7 +20,7 @@
import co.elastic.apm.agent.configuration.MetricsConfiguration;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricSet;
import co.elastic.apm.agent.report.ReporterConfiguration;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetricsTest.java
index bc86fd0cda..83527ffe6b 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/AgentReporterMetricsTest.java
@@ -20,7 +20,7 @@
import co.elastic.apm.agent.configuration.MetricsConfiguration;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricSet;
import co.elastic.apm.agent.report.ReporterConfiguration;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/CGroupMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/CGroupMetricsTest.java
index a8d80db1e0..5dd24ae174 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/CGroupMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/CGroupMetricsTest.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.ReporterConfiguration;
import org.junit.jupiter.api.Test;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetricsTest.java
index dc15f3874c..3f87b5c70c 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmFdMetricsTest.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.ReporterConfiguration;
import org.junit.jupiter.api.condition.DisabledOnOs;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetricsTest.java
index 05c4fe4348..413b148d5c 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetricsTest.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.ReporterConfiguration;
import org.assertj.core.api.AbstractDoubleAssert;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/SystemMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/SystemMetricsTest.java
index dea7de26c2..3226241264 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/SystemMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/SystemMetricsTest.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.ReporterConfiguration;
import org.junit.jupiter.api.Test;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/ThreadMetricsTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/ThreadMetricsTest.java
index 287047b2ea..4fec12cf1a 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/ThreadMetricsTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/builtin/ThreadMetricsTest.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.metrics.builtin;
import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.ReporterConfiguration;
import org.junit.jupiter.api.Test;
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/MetricSetSerializationTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/MetricSetSerializationTest.java
index 7f696af5f1..1abc82a114 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/MetricSetSerializationTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/MetricSetSerializationTest.java
@@ -20,7 +20,7 @@
import co.elastic.apm.agent.configuration.MetricsConfiguration;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricCollector;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.MetricsProvider;
diff --git a/apm-agent-core/src/test/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener b/apm-agent-core/src/test/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
similarity index 100%
rename from apm-agent-core/src/test/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
rename to apm-agent-core/src/test/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
diff --git a/apm-agent-plugins/apm-jmx-plugin/pom.xml b/apm-agent-plugins/apm-jmx-plugin/pom.xml
index 64af345431..8dddd765b6 100644
--- a/apm-agent-plugins/apm-jmx-plugin/pom.xml
+++ b/apm-agent-plugins/apm-jmx-plugin/pom.xml
@@ -15,13 +15,4 @@
${project.basedir}/../..
-
-
-
- ${project.groupId}
- apm-agent-core
- ${project.version}
-
-
-
diff --git a/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetric.java b/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetric.java
index 9fa1b4da6d..9409e810af 100644
--- a/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetric.java
+++ b/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetric.java
@@ -18,12 +18,11 @@
*/
package co.elastic.apm.agent.jmx;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import org.stagemonitor.configuration.converter.AbstractValueConverter;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import java.util.ArrayList;
diff --git a/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetricTracker.java b/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetricTracker.java
index 5560f338a1..5c3733a639 100644
--- a/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetricTracker.java
+++ b/apm-agent-plugins/apm-jmx-plugin/src/main/java/co/elastic/apm/agent/jmx/JmxMetricTracker.java
@@ -18,16 +18,15 @@
*/
package co.elastic.apm.agent.jmx;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.DoubleSupplier;
-import co.elastic.apm.agent.metrics.Labels;
-import co.elastic.apm.agent.metrics.MetricRegistry;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.metrics.Labels;
+import co.elastic.apm.agent.tracer.GlobalLocks;
import co.elastic.apm.agent.sdk.internal.util.ExecutorUtils;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
-import co.elastic.apm.agent.tracer.GlobalLocks;
import co.elastic.apm.agent.tracer.configuration.TimeDuration;
import org.stagemonitor.configuration.ConfigurationOption;
@@ -66,8 +65,8 @@ public class JmxMetricTracker extends AbstractLifecycleListener {
private volatile Thread logManagerPropertyPoller;
@Nullable
private volatile MBeanServer server;
+ private final Tracer tracer;
private final JmxConfiguration jmxConfiguration;
- private final MetricRegistry metricRegistry;
@Nullable
private volatile NotificationListener listener;
@@ -76,16 +75,16 @@ public class JmxMetricTracker extends AbstractLifecycleListener {
@Nullable
private ScheduledExecutorService retryExecutor;
- public JmxMetricTracker(ElasticApmTracer tracer) {
+ public JmxMetricTracker(Tracer tracer) {
+ this.tracer = tracer;
jmxConfiguration = tracer.getConfig(JmxConfiguration.class);
- metricRegistry = tracer.getMetricRegistry();
// using a synchronized list so adding to the list does not require synchronization
failedMetrics = Collections.synchronizedList(new ArrayList());
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) {
ConfigurationOption.ChangeListener> captureJmxListener = new ConfigurationOption.ChangeListener>() {
@Override
public void onChange(ConfigurationOption> configurationOption, List oldValue, List newValue) {
@@ -197,10 +196,10 @@ public void onChange(ConfigurationOption> configurationOption, List
for (JmxMetricRegistration addedRegistration : removeAll(oldRegistrations, newRegistrations)) {
- addedRegistration.register(platformMBeanServer, metricRegistry);
+ addedRegistration.register(platformMBeanServer, tracer);
}
for (JmxMetricRegistration deletedRegistration : removeAll(newRegistrations, oldRegistrations)) {
- deletedRegistration.unregister(metricRegistry);
+ deletedRegistration.unregister(tracer);
}
}
});
@@ -326,7 +325,7 @@ private static List removeAll(List removeFromThis, List toRemove) {
private void register(List jmxMetrics, MBeanServer server, List failedMetrics) {
for (JmxMetricRegistration registration : compileJmxMetricRegistrations(jmxMetrics, server, failedMetrics)) {
- registration.register(server, metricRegistry);
+ registration.register(server, tracer);
}
}
@@ -474,9 +473,9 @@ private JmxMetricRegistration(String metricName, Labels labels, String jmxAttrib
}
- void register(final MBeanServer server, final MetricRegistry metricRegistry) {
+ void register(final MBeanServer server, final Tracer tracer) {
logger.debug("Registering JMX metric {} {}.{} as metric_name: {} labels: {}", objectName, jmxAttribute, compositeDataKey, metricName, labels);
- metricRegistry.add(metricName, labels, new DoubleSupplier() {
+ tracer.addGauge(metricName, labels, new DoubleSupplier() {
@Override
public double get() {
try {
@@ -489,7 +488,7 @@ public double get() {
return value;
} catch (InstanceNotFoundException | AttributeNotFoundException e) {
if (unsubscribeOnError) {
- unregister(metricRegistry);
+ unregister(tracer);
}
return Double.NaN;
} catch (Exception e) {
@@ -499,9 +498,9 @@ public double get() {
});
}
- void unregister(MetricRegistry metricRegistry) {
+ void unregister(Tracer tracer) {
logger.debug("Unregistering JMX metric {} {}.{} metric_name: {} labels: {}", objectName, jmxAttribute, compositeDataKey, metricName, labels);
- metricRegistry.removeGauge(metricName, labels);
+ tracer.removeGauge(metricName, labels);
}
@Override
diff --git a/apm-agent-plugins/apm-jmx-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener b/apm-agent-plugins/apm-jmx-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
similarity index 100%
rename from apm-agent-plugins/apm-jmx-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
rename to apm-agent-plugins/apm-jmx-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
diff --git a/apm-agent-plugins/apm-jmx-plugin/src/test/java/co/elastic/apm/agent/jmx/JmxMetricTrackerTest.java b/apm-agent-plugins/apm-jmx-plugin/src/test/java/co/elastic/apm/agent/jmx/JmxMetricTrackerTest.java
index cc8eeca851..640a374bde 100644
--- a/apm-agent-plugins/apm-jmx-plugin/src/test/java/co/elastic/apm/agent/jmx/JmxMetricTrackerTest.java
+++ b/apm-agent-plugins/apm-jmx-plugin/src/test/java/co/elastic/apm/agent/jmx/JmxMetricTrackerTest.java
@@ -21,7 +21,7 @@
import co.elastic.apm.agent.MockTracer;
import co.elastic.apm.agent.configuration.SpyConfiguration;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.metrics.Labels;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.report.serialize.MetricRegistrySerializer;
import org.junit.jupiter.api.AfterEach;
diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
index 8ff7909d41..13b891a786 100644
--- a/apm-agent-plugins/apm-micrometer-plugin/pom.xml
+++ b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
@@ -20,12 +20,6 @@
-
-
- ${project.groupId}
- apm-agent-core
- ${project.version}
-
io.micrometer
micrometer-core
diff --git a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/AbstractMicrometerInstrumentation.java b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/AbstractMicrometerInstrumentation.java
index f9ac5ef254..056daf8df2 100644
--- a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/AbstractMicrometerInstrumentation.java
+++ b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/AbstractMicrometerInstrumentation.java
@@ -18,7 +18,6 @@
*/
package co.elastic.apm.agent.micrometer;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.tracer.Tracer;
@@ -30,7 +29,7 @@ public abstract class AbstractMicrometerInstrumentation extends ElasticApmInstru
private static final Tracer tracer = GlobalTracer.get();
- static final MicrometerMetricsReporter reporter = new MicrometerMetricsReporter(tracer.require(ElasticApmTracer.class));
+ static final MicrometerMetricsReporter reporter = new MicrometerMetricsReporter(tracer);
public Collection getInstrumentationGroupNames() {
return Collections.singletonList("micrometer");
diff --git a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMeterRegistrySerializer.java b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMeterRegistrySerializer.java
index 683df9632f..58048dde12 100644
--- a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMeterRegistrySerializer.java
+++ b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMeterRegistrySerializer.java
@@ -18,13 +18,13 @@
*/
package co.elastic.apm.agent.micrometer;
-import co.elastic.apm.agent.report.serialize.DslJsonSerializer;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakConcurrent;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakSet;
import co.elastic.apm.agent.tracer.configuration.MetricsConfiguration;
+import co.elastic.apm.agent.tracer.metrics.DslJsonUtil;
import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonWriter;
import com.dslplatform.json.NumberConverter;
@@ -100,14 +100,14 @@ boolean serializeMetricSet(List tags, List meters, long epochMicros,
boolean dedotMetricName = config.isDedotCustomMetrics();
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("metricset", jw);
+ DslJsonUtil.writeFieldName("metricset", jw);
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("timestamp", jw);
+ DslJsonUtil.writeFieldName("timestamp", jw);
NumberConverter.serialize(epochMicros, jw);
jw.writeByte(JsonWriter.COMMA);
serializeTags(tags, replaceBuilder, jw);
- DslJsonSerializer.writeFieldName("samples", jw);
+ DslJsonUtil.writeFieldName("samples", jw);
jw.writeByte(JsonWriter.OBJECT_START);
ClassLoader originalContextCL = PrivilegedActionUtils.getContextClassLoader(Thread.currentThread());
@@ -167,16 +167,16 @@ private static void serializeTags(List tags, StringBuilder replaceBuilder,
if (tags.isEmpty()) {
return;
}
- DslJsonSerializer.writeFieldName("tags", jw);
+ DslJsonUtil.writeFieldName("tags", jw);
jw.writeByte(OBJECT_START);
for (int i = 0, tagsSize = tags.size(); i < tagsSize; i++) {
Tag tag = tags.get(i);
if (i > 0) {
jw.writeByte(COMMA);
}
- DslJsonSerializer.writeStringValue(DslJsonSerializer.sanitizePropertyName(tag.getKey(), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(tag.getKey(), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
- DslJsonSerializer.writeStringValue(tag.getValue(), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(tag.getValue(), replaceBuilder, jw);
}
jw.writeByte(OBJECT_END);
jw.writeByte(COMMA);
@@ -320,7 +320,7 @@ private static void serializeValueStart(String key, String suffix, JsonWriter jw
private static void serializeObjectStart(String key, String objectName, String suffix, JsonWriter jw, StringBuilder replaceBuilder, boolean dedotMetricName) {
replaceBuilder.setLength(0);
if (dedotMetricName) {
- DslJsonSerializer.sanitizePropertyName(key, replaceBuilder);
+ DslJsonUtil.sanitizePropertyName(key, replaceBuilder);
} else {
replaceBuilder.append(key);
}
diff --git a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMetricsReporter.java b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMetricsReporter.java
index 3379ce66cd..6ec9e2cbaa 100644
--- a/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMetricsReporter.java
+++ b/apm-agent-plugins/apm-micrometer-plugin/src/main/java/co/elastic/apm/agent/micrometer/MicrometerMetricsReporter.java
@@ -18,14 +18,12 @@
*/
package co.elastic.apm.agent.micrometer;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.Tracer;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.report.Reporter;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakConcurrent;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakMap;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.configuration.MetricsConfiguration;
import co.elastic.apm.agent.tracer.configuration.ReporterConfiguration;
import com.dslplatform.json.JsonWriter;
@@ -90,19 +88,17 @@ public class MicrometerMetricsReporter implements Runnable, Closeable {
private final WeakMap meterRegistries = WeakConcurrent.buildMap();
private final WeakMap configMap = WeakConcurrent.buildMap();
private final MicrometerMeterRegistrySerializer serializer;
- private final Reporter reporter;
- private final ElasticApmTracer tracer;
+ private final Tracer tracer;
private final AtomicBoolean scheduledReporting = new AtomicBoolean();
private final boolean disableScheduler;
- public MicrometerMetricsReporter(ElasticApmTracer tracer) {
+ public MicrometerMetricsReporter(Tracer tracer) {
this(tracer, false);
}
//constructor split up to have this available for testing
- MicrometerMetricsReporter(ElasticApmTracer tracer, boolean disableSchedulerThread) {
+ MicrometerMetricsReporter(Tracer tracer, boolean disableSchedulerThread) {
this.tracer = tracer;
- this.reporter = tracer.getReporter();
tracer.addShutdownHook(this);
serializer = new MicrometerMeterRegistrySerializer(tracer.getConfig(MetricsConfiguration.class));
this.disableScheduler = disableSchedulerThread;
@@ -135,7 +131,7 @@ private synchronized void scheduleReporting() {
// called for every class loader that loaded micrometer
// that's because a new MicrometerMetricsReporter instance is created in every IndyPluginClassLoader
// for example if multiple webapps use potentially different versions of Micrometer
- tracer.getSharedSingleThreadedPool().scheduleAtFixedRate(this, 0, INTERVAL_BETWEEN_CHECKS_IN_MILLISECONDS, TimeUnit.MILLISECONDS);
+ tracer.schedule(this, INTERVAL_BETWEEN_CHECKS_IN_MILLISECONDS, TimeUnit.MILLISECONDS);
}
}
@@ -147,7 +143,7 @@ public void run() {
//run split up to have this available for testing
void run(final long now) {
- if (tracer.getState() != Tracer.TracerState.RUNNING) {
+ if (!tracer.isRunning()) {
return;
}
long metricsIntervalMs = tracer.getConfig(ReporterConfiguration.class).getMetricsIntervalMs();
@@ -190,7 +186,7 @@ void run(final long now) {
}
logger.debug("Reporting {} meters", meterConsumer.meters.size());
for (JsonWriter serializedMetricSet : serializer.serialize(meterConsumer.meters, now * 1000)) {
- reporter.reportMetrics(serializedMetricSet);
+ tracer.reportMetric(serializedMetricSet);
}
}
@@ -220,7 +216,7 @@ private long getStep(MeterRegistry meterRegistry) {
public void close() {
// flushing out metrics before shutting down
// this is especially important for counters as the counts that were accumulated between the last report and the shutdown would otherwise get lost
- tracer.getSharedSingleThreadedPool().submit(this);
+ tracer.submit(this);
}
private static class MeterMapConsumer implements Consumer {
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 9793bbbe76..95c57c60c3 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,11 @@
*/
package co.elastic.apm.agent.embeddedotel;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.embeddedotel.proxy.ProxyMeterProvider;
-import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Tracer;
import io.opentelemetry.sdk.metrics.SdkMeterProvider;
import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder;
@@ -40,14 +40,14 @@ public class EmbeddedSdkManager extends AbstractLifecycleListener {
private static final Logger logger = LoggerFactory.getLogger(EmbeddedSdkManager.class);
@Nullable
- private ElasticApmTracer tracer;
+ private Tracer tracer;
@Nullable
private volatile SdkMeterProvider sdkInstance;
private boolean isShutdown = false;
@Override
- public synchronized void start(ElasticApmTracer tracer) throws Exception {
+ public synchronized void start(Tracer tracer) throws Exception {
this.tracer = tracer;
}
diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
similarity index 100%
rename from apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
rename to apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-embedded-metrics-sdk/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/src/main/java/co/elastic/apm/agent/otelmetricsdk/MetricSetSerializer.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/src/main/java/co/elastic/apm/agent/otelmetricsdk/MetricSetSerializer.java
index de8021c3bd..6484e08906 100644
--- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/src/main/java/co/elastic/apm/agent/otelmetricsdk/MetricSetSerializer.java
+++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-metricsdk-plugin/src/main/java/co/elastic/apm/agent/otelmetricsdk/MetricSetSerializer.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.otelmetricsdk;
import co.elastic.apm.agent.report.Reporter;
-import co.elastic.apm.agent.report.serialize.DslJsonSerializer;
+import co.elastic.apm.agent.tracer.metrics.DslJsonUtil;
import com.dslplatform.json.BoolConverter;
import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonWriter;
@@ -56,14 +56,14 @@ public MetricSetSerializer(Attributes attributes, CharSequence instrumentationSc
jw = DSL_JSON.newWriter(INITIAL_BUFFER_SIZE);
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("metricset", jw);
+ DslJsonUtil.writeFieldName("metricset", jw);
jw.writeByte(JsonWriter.OBJECT_START);
{
- DslJsonSerializer.writeFieldName("timestamp", jw);
+ DslJsonUtil.writeFieldName("timestamp", jw);
NumberConverter.serialize(epochMicros, jw);
jw.writeByte(JsonWriter.COMMA);
serializeAttributes(instrumentationScopeName, attributes);
- DslJsonSerializer.writeFieldName("samples", jw);
+ DslJsonUtil.writeFieldName("samples", jw);
jw.writeByte(JsonWriter.OBJECT_START);
}
}
@@ -188,7 +188,7 @@ private void serializeAttributes(CharSequence instrumentationScopeName, Attribut
if (attributeMap.isEmpty() && instrumentationScopeName.length() == 0) {
return;
}
- DslJsonSerializer.writeFieldName("tags", jw);
+ DslJsonUtil.writeFieldName("tags", jw);
jw.writeByte(OBJECT_START);
boolean anyWritten = false;
if (instrumentationScopeName.length() > 0) {
@@ -210,7 +210,7 @@ private boolean serializeAttribute(AttributeKey> key, @Nullable Object value,
if (prependComma) {
jw.writeByte(COMMA);
}
- DslJsonSerializer.writeStringValue(DslJsonSerializer.sanitizePropertyName(key.getKey(), replaceBuilder), replaceBuilder, jw);
+ DslJsonUtil.writeStringValue(DslJsonUtil.sanitizePropertyName(key.getKey(), replaceBuilder), replaceBuilder, jw);
jw.writeByte(JsonWriter.SEMI);
AttributeType type = key.getType();
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingFactory.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingFactory.java
index 400e28623c..e7ddcb77a4 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingFactory.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ProfilingFactory.java
@@ -18,8 +18,9 @@
*/
package co.elastic.apm.agent.profiler;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
+import co.elastic.apm.agent.tracer.Tracer;
public class ProfilingFactory extends AbstractLifecycleListener {
@@ -35,9 +36,10 @@ public ProfilingFactory(ElasticApmTracer tracer) {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) throws Exception {
profiler.start(tracer);
- tracer.registerSpanListener(new ProfilingActivationListener(tracer, profiler));
+ ElasticApmTracer elasticApmTracer = tracer.require(ElasticApmTracer.class);
+ elasticApmTracer.registerSpanListener(new ProfilingActivationListener(elasticApmTracer, profiler));
}
@Override
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
index 1a33248b5a..0c8cb3f674 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.profiler;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.context.AbstractLifecycleListener;
+import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.impl.transaction.StackFrame;
@@ -30,6 +30,7 @@
import co.elastic.apm.agent.sdk.internal.util.ExecutorUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.configuration.CoreConfiguration;
import co.elastic.apm.agent.tracer.configuration.TimeDuration;
import co.elastic.apm.agent.tracer.pooling.Allocator;
@@ -697,7 +698,7 @@ void copyFromFiles(Path activationEvents, Path traces) throws IOException {
}
@Override
- public void start(ElasticApmTracer tracer) {
+ public void start(Tracer tracer) {
scheduler.submit(this);
}
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener b/apm-agent-plugins/apm-profiling-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
similarity index 100%
rename from apm-agent-plugins/apm-profiling-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener
rename to apm-agent-plugins/apm-profiling-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml
index dccd4562ed..096102758d 100644
--- a/apm-agent-tracer/pom.xml
+++ b/apm-agent-tracer/pom.xml
@@ -24,6 +24,11 @@
apm-agent-common
${project.version}
+
+ com.dslplatform
+ dsl-json
+ 1.9.3
+
net.bytebuddy
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/AbstractLifecycleListener.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractLifecycleListener.java
similarity index 83%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/context/AbstractLifecycleListener.java
rename to apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractLifecycleListener.java
index 02c4f0c0be..6489ae1441 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/AbstractLifecycleListener.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/AbstractLifecycleListener.java
@@ -16,17 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package co.elastic.apm.agent.context;
-
-import co.elastic.apm.agent.impl.ElasticApmTracer;
+package co.elastic.apm.agent.tracer;
public abstract class AbstractLifecycleListener implements LifecycleListener {
@Override
- public void init(ElasticApmTracer tracer) throws Exception {
+ public void init(Tracer tracer) throws Exception {
}
@Override
- public void start(ElasticApmTracer tracer) throws Exception {
+ public void start(Tracer tracer) throws Exception {
}
@Override
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
index 9cae3d1b20..692ffdca5e 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/GlobalTracer.java
@@ -19,13 +19,17 @@
package co.elastic.apm.agent.tracer;
import co.elastic.apm.agent.tracer.dispatch.HeaderGetter;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.pooling.ObjectPoolFactory;
import co.elastic.apm.agent.tracer.reference.ReferenceCounted;
import co.elastic.apm.agent.tracer.reference.ReferenceCountedMap;
import co.elastic.apm.agent.tracer.service.Service;
+import com.dslplatform.json.JsonWriter;
import javax.annotation.Nullable;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
public class GlobalTracer implements Tracer {
@@ -166,4 +170,35 @@ public void flush() {
public void completeMetaData(String name, String version, String id, String region) {
tracer.completeMetaData(name, version, id, region);
}
+
+ @Override
+ public void removeGauge(String name, Labels.Immutable labels) {
+ tracer.removeGauge(name, labels);
+ }
+
+ @Override
+ public void addGauge(String name, Labels.Immutable labels, DoubleSupplier supplier) {
+ tracer.addGauge(name, labels, supplier);
+ }
+
+ @Override
+ public void submit(Runnable job) {
+ tracer.submit(job);
+ }
+
+ @Override
+ public void schedule(Runnable job, long interval, TimeUnit timeUnit) {
+ tracer.schedule(job, interval, timeUnit);
+ }
+
+ @Override
+ public void addShutdownHook(AutoCloseable hook) {
+ tracer.addShutdownHook(hook);
+ }
+
+ @Override
+ public void reportMetric(JsonWriter metrics) {
+ tracer.reportMetric(metrics);
+ }
+
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/LifecycleListener.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/LifecycleListener.java
similarity index 74%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/context/LifecycleListener.java
rename to apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/LifecycleListener.java
index 3b4716518c..a1b55634c4 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/context/LifecycleListener.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/LifecycleListener.java
@@ -16,42 +16,39 @@
* specific language governing permissions and limitations
* under the License.
*/
-package co.elastic.apm.agent.context;
-
-import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.Tracer;
+package co.elastic.apm.agent.tracer;
/**
- * A {@link LifecycleListener} notifies about the start and stop event of the {@link ElasticApmTracer}.
+ * A {@link LifecycleListener} notifies about the start and stop event of the {@link Tracer}.
*
* Implement this interface and register it as a {@linkplain java.util.ServiceLoader service} under
- * {@code src/main/resources/META-INF/services/co.elastic.apm.agent.context.LifecycleListener}.
+ * {@code src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener}.
*
*
- * Implementations may have a constructor with an {@link ElasticApmTracer} argument
+ * Implementations may have a constructor with an {@link Tracer} argument
*
*/
public interface LifecycleListener {
/**
- * Callback for tracer initialization. As opposed to {@link LifecycleListener#start(ElasticApmTracer)}, which may
+ * Callback for tracer initialization. As opposed to {@link LifecycleListener#start(Tracer)}, which may
* be called in a delay, this callback is called at the bootstrap of the JVM, before anything else start.
* This may be useful for listeners that need to operate very early on, for example such that setup class loading
* requirement to support OSGi systems.
* @param tracer the tracer
* @throws Exception
*/
- void init(ElasticApmTracer tracer) throws Exception;
+ void init(Tracer tracer) throws Exception;
/**
- * Callback for when the {@link ElasticApmTracer} starts.
+ * Callback for when the {@link Tracer} starts.
*
* @param tracer The tracer.
*/
- void start(ElasticApmTracer tracer) throws Exception;
+ void start(Tracer tracer) throws Exception;
/**
- * Callback for when {@link ElasticApmTracer#pause()} has been called.
+ * Callback for when the {@link Tracer} is paused.
*
* Typically, this method is used to reduce overhead on the application to a minimum. This can be done by cleaning
* up resources like object pools, as well as by avoiding tracing-related overhead.
@@ -65,7 +62,7 @@ public interface LifecycleListener {
void pause() throws Exception;
/**
- * Callback for when {@link ElasticApmTracer#resume()} has been called.
+ * Callback for when {@link Tracer} resumes.
*
* Typically, used in order to revert the actions taken by the {@link LifecycleListener#pause()} method, allowing
* the agent to restore all tracing capabilities
@@ -79,7 +76,7 @@ public interface LifecycleListener {
void resume() throws Exception;
/**
- * Callback for when {@link ElasticApmTracer#stop()} has been called.
+ * Callback for when the {@link Tracer} is stopped.
*
* Typically, this method is used to clean up resources like thread pools
* so that there are no class loader leaks when a webapp is redeployed in an application server.
@@ -96,17 +93,14 @@ public interface LifecycleListener {
* The order in which lifecycle listeners are called is non-deterministic.
*
*
- * The {@link ElasticApmTracer#getSharedSingleThreadedPool()} is shut down gracefully,
+ * Any {@link Tracer}-managed thread pool is shut down gracefully,
* waiting a moment for the already scheduled tasks to be completed.
* This means that implementations of this method can schedule a last command to this pool that is executed before shutdown.
- * The {@link Tracer#getState()} will still be {@link Tracer.TracerState#RUNNING} in the tasks scheduled to
- * {@link ElasticApmTracer#getSharedSingleThreadedPool()} within this method.
- *
- *
- * The tracer state is set to {@link co.elastic.apm.agent.impl.Tracer.TracerState#STOPPED}.
+ * The {@link Tracer#isRunning()} will still be {@code true} in the tasks scheduled to
+ * complete within {@link Tracer}-managed threads within this method.
*
*
- * The {@link co.elastic.apm.agent.report.Reporter} is closed.
+ * The tracer state is set to {@link Tracer#isRunning()} being {@code false}.
*
*
*
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
index ac1610f99d..85fab5a76a 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/NoopTracer.java
@@ -19,15 +19,18 @@
package co.elastic.apm.agent.tracer;
import co.elastic.apm.agent.tracer.dispatch.HeaderGetter;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.pooling.ObjectPoolFactory;
import co.elastic.apm.agent.tracer.reference.ReferenceCounted;
import co.elastic.apm.agent.tracer.reference.ReferenceCountedMap;
import co.elastic.apm.agent.tracer.service.Service;
+import com.dslplatform.json.JsonWriter;
import javax.annotation.Nullable;
-import java.io.IOException;
import java.util.Collections;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
class NoopTracer implements Tracer {
@@ -140,4 +143,28 @@ public void flush() {
@Override
public void completeMetaData(String name, String version, String id, String region) {
}
+
+ @Override
+ public void addGauge(String name, Labels.Immutable labels, DoubleSupplier supplier) {
+ }
+
+ @Override
+ public void removeGauge(String name, Labels.Immutable labels) {
+ }
+
+ @Override
+ public void submit(Runnable job) {
+ }
+
+ @Override
+ public void schedule(Runnable job, long interval, TimeUnit timeUnit) {
+ }
+
+ @Override
+ public void addShutdownHook(AutoCloseable hook) {
+ }
+
+ @Override
+ public void reportMetric(JsonWriter metrics) {
+ }
}
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
index 666ea4fca6..4f1d6efc2e 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Tracer.java
@@ -19,13 +19,17 @@
package co.elastic.apm.agent.tracer;
import co.elastic.apm.agent.tracer.dispatch.HeaderGetter;
+import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
+import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.pooling.ObjectPoolFactory;
import co.elastic.apm.agent.tracer.reference.ReferenceCounted;
import co.elastic.apm.agent.tracer.reference.ReferenceCountedMap;
import co.elastic.apm.agent.tracer.service.Service;
+import com.dslplatform.json.JsonWriter;
import javax.annotation.Nullable;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
public interface Tracer {
@@ -92,6 +96,18 @@ public interface Tracer {
@Nullable
Throwable redactExceptionIfRequired(@Nullable Throwable original);
+ void removeGauge(String name, Labels.Immutable labels);
+
+ void addGauge(String name, Labels.Immutable labels, DoubleSupplier supplier);
+
+ void submit(Runnable job);
+
+ void schedule(Runnable job, long interval, TimeUnit timeUnit);
+
+ void addShutdownHook(AutoCloseable hook);
+
+ void reportMetric(JsonWriter metrics); // TODO: replace with internalized DSL writer that only accepts data.
+
void flush();
void completeMetaData(String name, String version, String id, String region);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/DoubleSupplier.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DoubleSupplier.java
similarity index 94%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/DoubleSupplier.java
rename to apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DoubleSupplier.java
index 120a72221d..7f5087b653 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/DoubleSupplier.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DoubleSupplier.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package co.elastic.apm.agent.metrics;
+package co.elastic.apm.agent.tracer.metrics;
public interface DoubleSupplier {
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DslJsonUtil.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DslJsonUtil.java
new file mode 100644
index 0000000000..256c8def4d
--- /dev/null
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/DslJsonUtil.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.tracer.metrics;
+
+import com.dslplatform.json.JsonWriter;
+
+public class DslJsonUtil {
+
+ public static final int MAX_VALUE_LENGTH = 1024;
+
+ private static final String[] DISALLOWED_IN_PROPERTY_NAME = new String[]{".", "*", "\""};
+
+ public static void writeFieldName(final String fieldName, final JsonWriter jw) {
+ jw.writeByte(JsonWriter.QUOTE);
+ jw.writeAscii(fieldName);
+ jw.writeByte(JsonWriter.QUOTE);
+ jw.writeByte(JsonWriter.SEMI);
+ }
+
+
+ public static CharSequence sanitizePropertyName(String key, StringBuilder replaceBuilder) {
+ for (int i = 0; i < DISALLOWED_IN_PROPERTY_NAME.length; i++) {
+ if (key.contains(DISALLOWED_IN_PROPERTY_NAME[i])) {
+ return replaceAll(key, DISALLOWED_IN_PROPERTY_NAME, "_", replaceBuilder);
+ }
+ }
+ return key;
+ }
+
+ private static CharSequence replaceAll(String s, String[] stringsToReplace, String replacement, StringBuilder replaceBuilder) {
+ // uses a instance variable StringBuilder to avoid allocations
+ replaceBuilder.setLength(0);
+ replaceBuilder.append(s);
+ for (String toReplace : stringsToReplace) {
+ replace(replaceBuilder, toReplace, replacement, 0);
+ }
+ return replaceBuilder;
+ }
+
+ static void replace(StringBuilder replaceBuilder, String toReplace, String replacement, int fromIndex) {
+ for (int i = replaceBuilder.indexOf(toReplace, fromIndex); i != -1; i = replaceBuilder.indexOf(toReplace, fromIndex)) {
+ replaceBuilder.replace(i, i + toReplace.length(), replacement);
+ fromIndex = i;
+ }
+ }
+
+ public static void writeStringValue(CharSequence value, final StringBuilder replaceBuilder, final JsonWriter jw) {
+ if (value.length() > MAX_VALUE_LENGTH) {
+ replaceBuilder.setLength(0);
+ replaceBuilder.append(value, 0, Math.min(value.length(), MAX_VALUE_LENGTH + 1));
+ writeStringBuilderValue(replaceBuilder, jw);
+ } else {
+ jw.writeString(value);
+ }
+ }
+
+ private static void writeStringBuilderValue(StringBuilder value, JsonWriter jw) {
+ if (value.length() > MAX_VALUE_LENGTH) {
+ value.setLength(MAX_VALUE_LENGTH - 1);
+ value.append('…');
+ }
+ jw.writeString(value);
+ }
+}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/Labels.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/Labels.java
similarity index 98%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/Labels.java
rename to apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/Labels.java
index c6a2e0475d..a48076bbed 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/Labels.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metrics/Labels.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package co.elastic.apm.agent.metrics;
+package co.elastic.apm.agent.tracer.metrics;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
@@ -31,10 +31,6 @@
* However, there are also top-level labels which are not nested under the {@code labels} object,
* for example {@link #getTransactionName()}, {@link #getTransactionType()}, {@link #getSpanType()} and {@link #getSpanSubType()}.
*
- * Metrics are structured into multiple {@link MetricSet}s.
- * For each distinct combination of {@link Labels}, there is one {@link MetricSet}.
- *
- *
* Labels allow for {@link CharSequence}s as a value,
* thus avoiding allocations for {@code transaction.name.toString()} when tracking breakdown metrics for a transaction.
* Iterations over the labels also don't allocate an Iterator, in contrast to {@code Map.entrySet().iterator()}.
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/LabelsTest.java b/apm-agent-tracer/src/test/java/co/elastic/apm/agent/tracer/metrics/LabelsTest.java
similarity index 99%
rename from apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/LabelsTest.java
rename to apm-agent-tracer/src/test/java/co/elastic/apm/agent/tracer/metrics/LabelsTest.java
index 21e55850c0..ef68d9a229 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/metrics/LabelsTest.java
+++ b/apm-agent-tracer/src/test/java/co/elastic/apm/agent/tracer/metrics/LabelsTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package co.elastic.apm.agent.metrics;
+package co.elastic.apm.agent.tracer.metrics;
import org.junit.jupiter.api.Test;
From 3c4a753619c4bb9ec0b2f98bd0a5da3eedeb1f8b Mon Sep 17 00:00:00 2001
From: Nugusbayev Kanagat <48118512+videnkz@users.noreply.github.com>
Date: Wed, 13 Mar 2024 15:02:36 +0500
Subject: [PATCH 014/132] differentiate Lambda url from api gateway (#3417)
---------
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
CHANGELOG.asciidoc | 4 ++++
.../APIGatewayProxyV1TransactionHelper.java | 9 +++++++++
.../APIGatewayProxyV2TransactionHelper.java | 19 +++++++++++++------
.../AbstractAPIGatewayTransactionHelper.java | 18 +++++++++++++++++-
.../awslambda/ApiGatewayV1LambdaTest.java | 11 +++++++++++
.../awslambda/ApiGatewayV2LambdaTest.java | 12 ++++++++++++
6 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c989a23500..6f863ba558 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -35,6 +35,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
===== Bug fixes
* Fixed problems with public API annotation inheritance - {pull}3551[#3551]
+[float]
+===== Features
+* Differentiate Lambda URLs from API Gateway in AWS Lambda integration - {pull}3417[#3417]
+
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
index 20cbe4c828..3d13b5f35c 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
@@ -111,6 +111,15 @@ protected void setTransactionTriggerData(Transaction> transaction, APIGatewayP
}
}
+ @Override
+ public String getDomainName(APIGatewayProxyRequestEvent apiGatewayRequest) {
+ APIGatewayProxyRequestEvent.ProxyRequestContext rContext = apiGatewayRequest.getRequestContext();
+ if (null == rContext) {
+ return null;
+ }
+ return rContext.getDomainName();
+ }
+
@Override
protected String getApiGatewayVersion() {
return "1.0";
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
index db3edf620b..f912577f92 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
@@ -19,10 +19,10 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.MapTextHeaderGetter;
-import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.tracer.Tracer;
+import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.tracer.Transaction;
+import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse;
@@ -45,8 +45,8 @@ public static APIGatewayProxyV2TransactionHelper getInstance() {
}
@Override
- protected Transaction> doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
- Transaction> transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
+ protected Transaction doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
+ Transaction transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
APIGatewayV2HTTPEvent.RequestContext requestContext = apiGatewayEvent.getRequestContext();
if (transaction != null) {
@@ -60,12 +60,12 @@ protected Transaction> doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEven
}
@Override
- public void captureOutputForTransaction(Transaction> transaction, APIGatewayV2HTTPResponse responseEvent) {
+ public void captureOutputForTransaction(Transaction transaction, APIGatewayV2HTTPResponse responseEvent) {
fillHttpResponseData(transaction, responseEvent.getHeaders(), responseEvent.getStatusCode());
}
@Override
- protected void setTransactionTriggerData(Transaction> transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
+ protected void setTransactionTriggerData(Transaction transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
super.setTransactionTriggerData(transaction, apiGatewayRequest);
APIGatewayV2HTTPEvent.RequestContext rContext = apiGatewayRequest.getRequestContext();
setApiGatewayContextData(transaction, rContext.getRequestId(), rContext.getApiId(),
@@ -112,4 +112,11 @@ protected String getResourcePath(APIGatewayV2HTTPEvent event) {
}
return routeKey;
}
+
+ @Nullable
+ @Override
+ String getDomainName(APIGatewayV2HTTPEvent apiGatewayRequest) {
+ APIGatewayV2HTTPEvent.RequestContext requestContext = apiGatewayRequest.getRequestContext();
+ return requestContext != null ? requestContext.getDomainName() : null;
+ }
}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
index b30ba86151..542eed68f6 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
@@ -30,6 +30,7 @@
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.tracer.AbstractSpan;
import com.amazonaws.services.lambda.runtime.Context;
+import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import javax.annotation.Nullable;
import java.nio.CharBuffer;
@@ -124,12 +125,27 @@ private boolean hasBody(@Nullable String contentTypeHeader, @Nullable String met
protected void setTransactionTriggerData(Transaction> transaction, I apiGatewayRequest) {
transaction.withType(TRANSACTION_TYPE);
CloudOrigin cloudOrigin = transaction.getContext().getCloudOrigin();
- cloudOrigin.withServiceName("api gateway");
+ if (isLambdaUrl(apiGatewayRequest)) {
+ cloudOrigin.withServiceName("lambda url");
+ } else {
+ cloudOrigin.withServiceName("api gateway");
+ }
cloudOrigin.withProvider("aws");
transaction.getFaas().getTrigger().withType("http");
transaction.getContext().getServiceOrigin().withVersion(getApiGatewayVersion());
}
+ private boolean isLambdaUrl(I apiGatewayRequest) {
+ String domainName = getDomainName(apiGatewayRequest);
+ if (null == domainName) {
+ return false;
+ }
+ return domainName.contains(".lambda-url.");
+ }
+
+ @Nullable
+ abstract String getDomainName(I apiGatewayRequest);
+
protected void setApiGatewayContextData(Transaction> transaction, @Nullable String requestId, @Nullable String apiId,
@Nullable String domainName, @Nullable String accountId) {
transaction.getFaas().getTrigger().withRequestId(requestId);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
index c6e0be6e30..6aa7f622b0 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
@@ -256,6 +256,17 @@ public void testTransactionNameWithUsePathAsName() {
assertThat(reporter.getFirstTransaction().getNameAsString()).isEqualTo("PUT /prod/proxy-test/12345");
}
+ @Test
+ public void testServiceNameAsLambdaUrl() {
+ APIGatewayProxyRequestEvent event = createInput();
+ event.getRequestContext().setDomainName("myurl.lambda-url.us-west-2.on.aws");
+ getFunction().handleRequest(event, context);
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isEqualTo("lambda url");
+ }
+
@Override
protected AbstractFunction createHandler() {
return new ApiGatewayV1LambdaFunction();
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
index d2a7cd73b4..d98e652551 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
@@ -31,6 +31,7 @@
import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.tracer.Outcome;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
+import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse;
import org.junit.BeforeClass;
@@ -249,6 +250,17 @@ public void testTransactionNameWithUsePathAsName() {
assertThat(reporter.getFirstTransaction().getNameAsString()).isEqualTo("PUT /prod/proxy-test/12345");
}
+ @Test
+ public void testServiceNameAsLambdaUrl() {
+ APIGatewayV2HTTPEvent event = createInput();
+ event.getRequestContext().setDomainName("myurl.lambda-url.us-west-2.on.aws");
+ getFunction().handleRequest(event, context);
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isEqualTo("lambda url");
+ }
+
@Override
protected AbstractFunction createHandler() {
return new ApiGatewayV2LambdaFunction();
From 3b22aada9ac2d7bee8beb028ce9fbdd822b5b2d6 Mon Sep 17 00:00:00 2001
From: Nugusbayev Kanagat <48118512+videnkz@users.noreply.github.com>
Date: Wed, 13 Mar 2024 21:01:25 +0500
Subject: [PATCH 015/132] added support to Elastic Load Balancer triggers
(#3411)
---------
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
CHANGELOG.asciidoc | 3 +-
.../APIGatewayProxyV1TransactionHelper.java | 43 +---
.../APIGatewayProxyV2TransactionHelper.java | 8 +-
.../awslambda/helper/AWSEventsHelper.java | 7 +
.../AbstractAPIGatewayTransactionHelper.java | 43 +++-
...nLoadBalancerRequestTransactionHelper.java | 164 +++++++++++++++
...LoadBalancerElbTargetGroupArnMetadata.java | 70 +++++++
.../agent/awslambda/AbstractLambdaTest.java | 1 +
.../awslambda/ApiGatewayV1LambdaTest.java | 43 +---
.../awslambda/ApiGatewayV2LambdaTest.java | 43 +---
...ionLoadBalancerRequestEventLambdaTest.java | 197 ++++++++++++++++++
.../awslambda/BaseGatewayLambdaTest.java | 75 +++++++
...tionLoadBalancerRequestLambdaFunction.java | 52 +++++
13 files changed, 617 insertions(+), 132 deletions(-)
create mode 100644 apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/ApplicationLoadBalancerRequestTransactionHelper.java
create mode 100644 apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/LoadBalancerElbTargetGroupArnMetadata.java
create mode 100644 apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApplicationLoadBalancerRequestEventLambdaTest.java
create mode 100644 apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/BaseGatewayLambdaTest.java
create mode 100644 apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/lambdas/ApplicationLoadBalancerRequestLambdaFunction.java
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6f863ba558..35349f1556 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -38,6 +38,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Features
* Differentiate Lambda URLs from API Gateway in AWS Lambda integration - {pull}3417[#3417]
+* Added lambda support for ELB triggers {pull}#3411[#3411]
[[release-notes-1.x]]
=== Java Agent version 1.x
@@ -127,7 +128,7 @@ affect you, if you are using the OpenTelemetry API only and not the SDK. - {pull
===== Features
* Added protection against invalid timestamps provided by manual instrumentation - {pull}3363[#3363]
* Added support for AWS SDK 2.21 - {pull}3373[#3373]
-* Capture bucket and object key to Lambda transaction as OTel attributes - `aws.s3.bueckt`, `aws.s3.key` - {pull}3364[#3364]
+* Capture bucket and object key to Lambda transaction as OTel attributes - `aws.s3.bucket`, `aws.s3.key` - {pull}3364[#3364]
* Added `context_propagation_only` configuration option - {pull}3358[#3358]
* Added attribute[*] for JMX pattern metrics (all metrics can now be generated with `object_name[*:type=*,name=*] attribute[*]`) - {pull}3376[#3376]
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
index 3d13b5f35c..a923707937 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV1TransactionHelper.java
@@ -19,8 +19,8 @@
package co.elastic.apm.agent.awslambda.helper;
import co.elastic.apm.agent.awslambda.MapTextHeaderGetter;
-import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.Transaction;
import com.amazonaws.services.lambda.runtime.Context;
@@ -28,7 +28,6 @@
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import javax.annotation.Nullable;
-import java.util.Map;
public class APIGatewayProxyV1TransactionHelper extends AbstractAPIGatewayTransactionHelper {
@@ -49,48 +48,17 @@ public static APIGatewayProxyV1TransactionHelper getInstance() {
@Override
protected Transaction> doStartTransaction(APIGatewayProxyRequestEvent apiGatewayEvent, Context lambdaContext) {
Transaction> transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
- String host = getHost(apiGatewayEvent);
if (null != transaction) {
+ String host = getHost(apiGatewayEvent.getHeaders());
+
fillHttpRequestData(transaction, getHttpMethod(apiGatewayEvent), apiGatewayEvent.getHeaders(), host,
- apiGatewayEvent.getRequestContext().getPath(), getQueryString(apiGatewayEvent), apiGatewayEvent.getBody());
+ apiGatewayEvent.getRequestContext().getPath(), getQueryString(apiGatewayEvent.getQueryStringParameters()), apiGatewayEvent.getBody());
}
return transaction;
}
- @Nullable
- private String getHost(APIGatewayProxyRequestEvent apiGatewayEvent) {
- String host = null;
- if (null != apiGatewayEvent.getHeaders()) {
- host = apiGatewayEvent.getHeaders().get("host");
- if (null == host) {
- host = apiGatewayEvent.getHeaders().get("Host");
- }
- }
- return host;
- }
-
- @Nullable
- private String getQueryString(APIGatewayProxyRequestEvent apiGatewayEvent) {
- Map queryParameters = apiGatewayEvent.getQueryStringParameters();
- if (null != queryParameters && !queryParameters.isEmpty()) {
- StringBuilder queryString = new StringBuilder();
- int i = 0;
- for (Map.Entry entry : apiGatewayEvent.getQueryStringParameters().entrySet()) {
- if (i > 0) {
- queryString.append('&');
- }
- queryString.append(entry.getKey());
- queryString.append('=');
- queryString.append(entry.getValue());
- i++;
- }
- return queryString.toString();
- }
- return null;
- }
-
@Override
public void captureOutputForTransaction(Transaction> transaction, APIGatewayProxyResponseEvent responseEvent) {
Integer statusCode = responseEvent.getStatusCode();
@@ -107,7 +75,7 @@ protected void setTransactionTriggerData(Transaction> transaction, APIGatewayP
if (null != rContext) {
setApiGatewayContextData(transaction, rContext.getRequestId(), rContext.getApiId(),
- getHost(apiGatewayRequest), rContext.getAccountId());
+ getHost(apiGatewayRequest.getHeaders()), rContext.getAccountId());
}
}
@@ -149,4 +117,5 @@ protected String getStage(APIGatewayProxyRequestEvent event) {
protected String getResourcePath(APIGatewayProxyRequestEvent event) {
return event.getRequestContext().getResourcePath();
}
+
}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
index f912577f92..0ba8476c22 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/APIGatewayProxyV2TransactionHelper.java
@@ -45,8 +45,8 @@ public static APIGatewayProxyV2TransactionHelper getInstance() {
}
@Override
- protected Transaction doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
- Transaction transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
+ protected Transaction> doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent, Context lambdaContext) {
+ Transaction> transaction = tracer.startChildTransaction(apiGatewayEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(apiGatewayEvent.getClass()));
APIGatewayV2HTTPEvent.RequestContext requestContext = apiGatewayEvent.getRequestContext();
if (transaction != null) {
@@ -60,12 +60,12 @@ protected Transaction doStartTransaction(APIGatewayV2HTTPEvent apiGatewayEvent,
}
@Override
- public void captureOutputForTransaction(Transaction transaction, APIGatewayV2HTTPResponse responseEvent) {
+ public void captureOutputForTransaction(Transaction> transaction, APIGatewayV2HTTPResponse responseEvent) {
fillHttpResponseData(transaction, responseEvent.getHeaders(), responseEvent.getStatusCode());
}
@Override
- protected void setTransactionTriggerData(Transaction transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
+ protected void setTransactionTriggerData(Transaction> transaction, APIGatewayV2HTTPEvent apiGatewayRequest) {
super.setTransactionTriggerData(transaction, apiGatewayRequest);
APIGatewayV2HTTPEvent.RequestContext rContext = apiGatewayRequest.getRequestContext();
setApiGatewayContextData(transaction, rContext.getRequestId(), rContext.getApiId(),
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
index b72c423c79..ae4f268ac8 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AWSEventsHelper.java
@@ -24,6 +24,8 @@
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerRequestEvent;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerResponseEvent;
import com.amazonaws.services.lambda.runtime.events.S3Event;
import com.amazonaws.services.lambda.runtime.events.SNSEvent;
import com.amazonaws.services.lambda.runtime.events.SQSEvent;
@@ -50,6 +52,9 @@ public static Transaction> startTransaction(Object input, Context lambdaContex
} else if (input instanceof S3Event) {
// S3 event trigger
return S3TransactionHelper.getInstance().startTransaction((S3Event) input, lambdaContext);
+ } else if (input instanceof ApplicationLoadBalancerRequestEvent) {
+ // Load Balancer Request event trigger
+ return ApplicationLoadBalancerRequestTransactionHelper.getInstance().startTransaction((ApplicationLoadBalancerRequestEvent) input, lambdaContext);
}
return PlainTransactionHelper.getInstance().startTransaction(input, lambdaContext);
}
@@ -59,6 +64,8 @@ public static void finalizeTransaction(Transaction> transaction, Object output
APIGatewayProxyV2TransactionHelper.getInstance().finalizeTransaction(transaction, (APIGatewayV2HTTPResponse) output, thrown);
} else if (output instanceof APIGatewayProxyResponseEvent) {
APIGatewayProxyV1TransactionHelper.getInstance().finalizeTransaction(transaction, (APIGatewayProxyResponseEvent) output, thrown);
+ } else if (output instanceof ApplicationLoadBalancerResponseEvent) {
+ ApplicationLoadBalancerRequestTransactionHelper.getInstance().finalizeTransaction(transaction, (ApplicationLoadBalancerResponseEvent) output, thrown);
} else {
// use PlainTransactionHelper for all triggers that do not expect an output
PlainTransactionHelper.getInstance().finalizeTransaction(transaction, output, thrown);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
index 542eed68f6..b8e2f30e0c 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/AbstractAPIGatewayTransactionHelper.java
@@ -18,6 +18,10 @@
*/
package co.elastic.apm.agent.awslambda.helper;
+import co.elastic.apm.agent.common.util.WildcardMatcher;
+import co.elastic.apm.agent.sdk.logging.Logger;
+import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.AbstractSpan;
import co.elastic.apm.agent.tracer.ServiceOrigin;
import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.Transaction;
@@ -25,12 +29,7 @@
import co.elastic.apm.agent.tracer.metadata.Request;
import co.elastic.apm.agent.tracer.metadata.Response;
import co.elastic.apm.agent.tracer.util.ResultUtil;
-import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.sdk.logging.Logger;
-import co.elastic.apm.agent.sdk.logging.LoggerFactory;
-import co.elastic.apm.agent.tracer.AbstractSpan;
import com.amazonaws.services.lambda.runtime.Context;
-import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
import javax.annotation.Nullable;
import java.nio.CharBuffer;
@@ -68,6 +67,38 @@ protected void fillHttpRequestData(Transaction> transaction, @Nullable String
}
}
+ @Nullable
+ protected String getHost(@Nullable Map headers) {
+ if (null == headers) {
+ return null;
+ }
+ String host = headers.get("host");
+ if (null == host) {
+ host = headers.get("Host");
+ }
+ return host;
+ }
+
+ @Nullable
+ protected String getQueryString(@Nullable Map queryParameters) {
+ if (null == queryParameters || queryParameters.isEmpty()) {
+ return null;
+ }
+ StringBuilder queryString = new StringBuilder();
+ int i = 0;
+ for (Map.Entry entry : queryParameters.entrySet()) {
+ if (i > 0) {
+ queryString.append('&');
+ }
+ queryString.append(entry.getKey());
+ queryString.append('=');
+ queryString.append(entry.getValue());
+ i++;
+ }
+ return queryString.toString();
+ }
+
+
protected void fillHttpResponseData(Transaction> transaction, @Nullable Map headers, int statusCode) {
Response response = transaction.getContext().getResponse();
response.withFinished(true);
@@ -82,7 +113,7 @@ protected void fillHttpResponseData(Transaction> transaction, @Nullable Map {
+ @Nullable
+ private static ApplicationLoadBalancerRequestTransactionHelper INSTANCE;
+
+ private ApplicationLoadBalancerRequestTransactionHelper(Tracer tracer) {
+ super(tracer);
+ }
+
+ public static ApplicationLoadBalancerRequestTransactionHelper getInstance() {
+ if (INSTANCE == null) {
+ INSTANCE = new ApplicationLoadBalancerRequestTransactionHelper(GlobalTracer.get());
+ }
+ return INSTANCE;
+ }
+
+ @Override
+ protected Transaction doStartTransaction(ApplicationLoadBalancerRequestEvent loadBalancerRequestEvent, Context lambdaContext) {
+ Transaction transaction = tracer.startChildTransaction(loadBalancerRequestEvent.getHeaders(), MapTextHeaderGetter.INSTANCE, PrivilegedActionUtils.getClassLoader(loadBalancerRequestEvent.getClass()));
+
+ if (transaction != null) {
+ String host = getHost(loadBalancerRequestEvent.getHeaders());
+ super.fillHttpRequestData(transaction, loadBalancerRequestEvent.getHttpMethod(), loadBalancerRequestEvent.getHeaders(), host,
+ loadBalancerRequestEvent.getPath(), getQueryString(loadBalancerRequestEvent.getQueryStringParameters()), loadBalancerRequestEvent.getBody());
+ }
+
+ return transaction;
+ }
+
+ @Override
+ public void captureOutputForTransaction(Transaction transaction, ApplicationLoadBalancerResponseEvent responseEvent) {
+ fillHttpResponseData(transaction, responseEvent.getHeaders(), responseEvent.getStatusCode());
+ }
+
+ @Override
+ protected void setTransactionTriggerData(Transaction transaction, ApplicationLoadBalancerRequestEvent loadBalancerRequestEvent) {
+ transaction.withType(TRANSACTION_TYPE);
+ CloudOrigin cloudOrigin = transaction.getContext().getCloudOrigin();
+ cloudOrigin.withServiceName("elb");
+ cloudOrigin.withProvider("aws");
+ FaasTrigger faasTrigger = transaction.getFaas().getTrigger();
+ faasTrigger.withType("http");
+ faasTrigger.withRequestId(getHeader(loadBalancerRequestEvent, "x-amzn-trace-id"));
+ LoadBalancerElbTargetGroupArnMetadata metadata = parseMetadata(loadBalancerRequestEvent);
+ if (null != metadata) {
+ ServiceOrigin serviceOrigin = transaction.getContext().getServiceOrigin();
+ serviceOrigin.withName(metadata.getTargetGroupName());
+ serviceOrigin.withId(metadata.getTargetGroupArn());
+ cloudOrigin.withAccountId(metadata.getAccountId());
+ cloudOrigin.withRegion(metadata.getCloudRegion());
+ }
+ }
+
+ @Nullable
+ private String getHeader(@Nonnull ApplicationLoadBalancerRequestEvent loadBalancerRequestEvent,
+ @Nonnull String headerName) {
+ Map headers = loadBalancerRequestEvent.getHeaders();
+ if (null == headers) {
+ return null;
+ }
+ return headers.get(headerName);
+ }
+
+ @Nullable
+ private LoadBalancerElbTargetGroupArnMetadata parseMetadata(ApplicationLoadBalancerRequestEvent event) {
+ if (null == event.getRequestContext()) {
+ return null;
+ }
+ ApplicationLoadBalancerRequestEvent.Elb elb = event.getRequestContext().getElb();
+ if (null == elb) {
+ return null;
+ }
+ String targetGroupArn = elb.getTargetGroupArn();
+ if (null == targetGroupArn) {
+ return null;
+ }
+ LoadBalancerElbTargetGroupArnMetadata metadata = new LoadBalancerElbTargetGroupArnMetadata(targetGroupArn);
+ String[] arnParts = targetGroupArn.split(":");
+ int arnPartsLength = arnParts.length;
+ if (arnPartsLength < 4) {
+ return metadata;
+ }
+ metadata.withCloudRegion(arnParts[3]);
+ if (arnPartsLength < 5) {
+ return metadata;
+ }
+ metadata.withAccountId(arnParts[4]);
+ if (arnPartsLength < 6) {
+ return metadata;
+ }
+ String targetGroup = arnParts[5];
+ String[] targetGroupParts = targetGroup.split("/");
+ if (targetGroupParts.length < 2) {
+ return metadata;
+ }
+ return metadata.withTargetGroupName(targetGroupParts[2]);
+ }
+
+ @Override
+ protected String getApiGatewayVersion() {
+ throw new UnsupportedOperationException("Not supported by ELB");
+ }
+
+ @Nullable
+ @Override
+ protected String getHttpMethod(ApplicationLoadBalancerRequestEvent event) {
+ return event.getHttpMethod();
+ }
+
+ @Nullable
+ @Override
+ protected String getRequestContextPath(ApplicationLoadBalancerRequestEvent event) {
+ return event.getPath();
+ }
+
+ @Nullable
+ @Override
+ protected String getStage(ApplicationLoadBalancerRequestEvent event) {
+ throw new UnsupportedOperationException("Not supported by ELB");
+ }
+
+ @Nullable
+ @Override
+ protected String getResourcePath(ApplicationLoadBalancerRequestEvent event) {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ String getDomainName(ApplicationLoadBalancerRequestEvent apiGatewayRequest) {
+ return null;
+ }
+}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/LoadBalancerElbTargetGroupArnMetadata.java b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/LoadBalancerElbTargetGroupArnMetadata.java
new file mode 100644
index 0000000000..a87af8e85c
--- /dev/null
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/main/java/co/elastic/apm/agent/awslambda/helper/LoadBalancerElbTargetGroupArnMetadata.java
@@ -0,0 +1,70 @@
+/*
+ * 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.awslambda.helper;
+
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+public class LoadBalancerElbTargetGroupArnMetadata {
+
+ private LoadBalancerElbTargetGroupArnMetadata() {}
+ public LoadBalancerElbTargetGroupArnMetadata(String targetGroupArn) {
+ this.targetGroupArn = targetGroupArn;
+ }
+ private String targetGroupArn;
+ private String cloudRegion;
+ private String accountId;
+ private String targetGroupName;
+
+ public LoadBalancerElbTargetGroupArnMetadata withCloudRegion(String cloudRegion) {
+ this.cloudRegion = cloudRegion;
+ return this;
+ }
+
+ @Nullable
+ public String getCloudRegion() {
+ return cloudRegion;
+ }
+
+ public LoadBalancerElbTargetGroupArnMetadata withAccountId(String accountId) {
+ this.accountId = accountId;
+ return this;
+ }
+
+ public LoadBalancerElbTargetGroupArnMetadata withTargetGroupName(String targetGroupName) {
+ this.targetGroupName = targetGroupName;
+ return this;
+ }
+
+ @Nonnull
+ public String getTargetGroupArn() {
+ return targetGroupArn;
+ }
+
+ @Nullable
+ public String getAccountId() {
+ return accountId;
+ }
+
+ @Nullable
+ public String getTargetGroupName() {
+ return targetGroupName;
+ }
+}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java
index e196b30175..9722136ae1 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/AbstractLambdaTest.java
@@ -27,6 +27,7 @@
import co.elastic.apm.agent.configuration.SpyConfiguration;
import co.elastic.apm.agent.impl.metadata.MetaDataMock;
import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
+import co.elastic.apm.agent.impl.transaction.Faas;
import co.elastic.apm.agent.impl.transaction.TraceContext;
import co.elastic.apm.agent.impl.transaction.TraceState;
import co.elastic.apm.agent.impl.transaction.Transaction;
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
index 6aa7f622b0..6006e85979 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV1LambdaTest.java
@@ -45,7 +45,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;
-public class ApiGatewayV1LambdaTest extends AbstractLambdaTest {
+public class ApiGatewayV1LambdaTest extends BaseGatewayLambdaTest {
@BeforeAll
@BeforeClass
@@ -144,34 +144,6 @@ public void testBasicCall() {
assertThat(faas.getTrigger().getRequestId()).isEqualTo(API_GATEWAY_REQUEST_ID);
}
- @Test
- public void testCallWithNullInput() {
- getFunction().handleRequest(null, context);
-
- reporter.awaitTransactionCount(1);
- reporter.awaitSpanCount(1);
- assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
- assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
- Transaction transaction = reporter.getFirstTransaction();
- assertThat(transaction.getNameAsString()).isEqualTo(TestContext.FUNCTION_NAME);
- assertThat(transaction.getType()).isEqualTo("request");
- assertThat(transaction.getResult()).isEqualTo("HTTP 2xx");
-
- assertThat(transaction.getContext().getCloudOrigin()).isNotNull();
- assertThat(transaction.getContext().getCloudOrigin().getProvider()).isEqualTo("aws");
- assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isNull();
- assertThat(transaction.getContext().getCloudOrigin().getRegion()).isNull();
- assertThat(transaction.getContext().getCloudOrigin().getAccountId()).isNull();
-
- assertThat(transaction.getContext().getServiceOrigin().hasContent()).isFalse();
-
- Faas faas = transaction.getFaas();
- assertThat(faas.getExecution()).isEqualTo(TestContext.AWS_REQUEST_ID);
-
- assertThat(faas.getTrigger().getType()).isEqualTo("other");
- assertThat(faas.getTrigger().getRequestId()).isNull();
- }
-
@ParameterizedTest
@ValueSource(booleans = {true, false})
public void testCallWithNullRequestContext(boolean isObjectNull) {
@@ -210,19 +182,6 @@ public void testCallWithNullRequestContext(boolean isObjectNull) {
assertThat(faas.getTrigger().getRequestId()).isNull();
}
- @Test
- public void testCallWithHErrorStatusCode() {
- Objects.requireNonNull(context).setErrorStatusCode();
- getFunction().handleRequest(createInput(), context);
- reporter.awaitTransactionCount(1);
- reporter.awaitSpanCount(1);
- assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
- assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
- Transaction transaction = reporter.getFirstTransaction();
- assertThat(transaction.getResult()).isEqualTo("HTTP 5xx");
- assertThat(transaction.getOutcome()).isEqualTo(Outcome.FAILURE);
- }
-
@Test
public void testTransactionNameForRestApiSpecificRoute() {
getFunction().handleRequest(createInput("PUT", "/prod/test/12345", "/test", "prod"), context);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
index d98e652551..4315ca4d3f 100644
--- a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApiGatewayV2LambdaTest.java
@@ -47,7 +47,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;
-public class ApiGatewayV2LambdaTest extends AbstractLambdaTest {
+public class ApiGatewayV2LambdaTest extends BaseGatewayLambdaTest {
@BeforeAll
@BeforeClass
@@ -151,34 +151,6 @@ public void testBasicCall() {
assertThat(faas.getTrigger().getRequestId()).isEqualTo(API_GATEWAY_REQUEST_ID);
}
- @Test
- public void testCallWithNullInput() {
- getFunction().handleRequest(null, context);
-
- reporter.awaitTransactionCount(1);
- reporter.awaitSpanCount(1);
- assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
- assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
- Transaction transaction = reporter.getFirstTransaction();
- assertThat(transaction.getNameAsString()).isEqualTo(TestContext.FUNCTION_NAME);
- assertThat(transaction.getType()).isEqualTo("request");
- assertThat(transaction.getResult()).isEqualTo("HTTP 2xx");
-
- assertThat(transaction.getContext().getCloudOrigin()).isNotNull();
- assertThat(transaction.getContext().getCloudOrigin().getProvider()).isEqualTo("aws");
- assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isNull();
- assertThat(transaction.getContext().getCloudOrigin().getRegion()).isNull();
- assertThat(transaction.getContext().getCloudOrigin().getAccountId()).isNull();
-
- assertThat(transaction.getContext().getServiceOrigin().hasContent()).isFalse();
-
- Faas faas = transaction.getFaas();
- assertThat(faas.getExecution()).isEqualTo(TestContext.AWS_REQUEST_ID);
-
- assertThat(faas.getTrigger().getType()).isEqualTo("other");
- assertThat(faas.getTrigger().getRequestId()).isNull();
- }
-
@ParameterizedTest
@ValueSource(booleans = {true, false})
public void testCallWithNullRequestContext(boolean isObjectNull) {
@@ -212,19 +184,6 @@ public void testCallWithNullRequestContext(boolean isObjectNull) {
assertThat(faas.getTrigger().getRequestId()).isNull();
}
- @Test
- public void testCallWithHErrorStatusCode() {
- Objects.requireNonNull(context).setErrorStatusCode();
- getFunction().handleRequest(createInput(), context);
- reporter.awaitTransactionCount(1);
- reporter.awaitSpanCount(1);
- assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
- assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
- Transaction transaction = reporter.getFirstTransaction();
- assertThat(transaction.getResult()).isEqualTo("HTTP 5xx");
- assertThat(transaction.getOutcome()).isEqualTo(Outcome.FAILURE);
- }
-
@Test
public void testTransactionNameForRestApiSpecificRoute() {
getFunction().handleRequest(createInput("PUT", "/prod/test", "ANY /test", "prod"), context);
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApplicationLoadBalancerRequestEventLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApplicationLoadBalancerRequestEventLambdaTest.java
new file mode 100644
index 0000000000..5583ba1834
--- /dev/null
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/ApplicationLoadBalancerRequestEventLambdaTest.java
@@ -0,0 +1,197 @@
+/*
+ * 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.awslambda;
+
+import co.elastic.apm.agent.awslambda.lambdas.AbstractFunction;
+import co.elastic.apm.agent.awslambda.lambdas.ApiGatewayV1LambdaFunction;
+import co.elastic.apm.agent.awslambda.lambdas.ApplicationLoadBalancerRequestLambdaFunction;
+import co.elastic.apm.agent.awslambda.lambdas.TestContext;
+import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.impl.context.Request;
+import co.elastic.apm.agent.impl.context.Response;
+import co.elastic.apm.agent.impl.context.Url;
+import co.elastic.apm.agent.impl.transaction.Faas;
+import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Outcome;
+import co.elastic.apm.agent.tracer.configuration.WebConfiguration;
+import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
+import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerRequestEvent;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerResponseEvent;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import javax.annotation.Nonnull;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Objects;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.doReturn;
+
+public class ApplicationLoadBalancerRequestEventLambdaTest extends BaseGatewayLambdaTest {
+
+ @BeforeAll
+ // Need to overwrite the beforeAll() method from parent,
+ // because we need to mock serverlessConfiguration BEFORE instrumentation is initialized!
+ public static synchronized void beforeAll() {
+ AbstractLambdaTest.initAllButInstrumentation();
+ doReturn(ApplicationLoadBalancerRequestLambdaFunction.class.getName()).when(Objects.requireNonNull(serverlessConfiguration)).getAwsLambdaHandler();
+ AbstractLambdaTest.initInstrumentation();
+ }
+
+ @Override
+ protected AbstractFunction createHandler() {
+ return new ApplicationLoadBalancerRequestLambdaFunction();
+ }
+
+ @Override
+ protected ApplicationLoadBalancerRequestEvent createInput() {
+ var event = new ApplicationLoadBalancerRequestEvent();
+ event.setBody("blablablabody");
+ event.setIsBase64Encoded(false);
+ var requestContext = new ApplicationLoadBalancerRequestEvent.RequestContext();
+ var elb = new ApplicationLoadBalancerRequestEvent.Elb();
+ elb.setTargetGroupArn("arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a");
+ requestContext.setElb(elb);
+ event.setRequestContext(requestContext);
+ event.setHttpMethod("POST");
+ event.setPath("/toolz/api/v2.0/downloadPDF/PDF_2020-09-11_11-06-01.pdf");
+ event.setQueryStringParameters(Map.of("test%40key", "test%40value", "language", "en-DE"));
+ event.setHeaders(Map.of("accept-encoding", "gzip,deflate",
+ "connection", "Keep-Alive",
+ "host", "blabla.com",
+ "user-agent", "Apache-HttpClient/4.5.13 (Java/11.0.15)",
+ "x-amzn-trace-id", "Root=1-xxxxxxxxxxxxxx",
+ "x-forwarded-for", "199.99.99.999",
+ "x-forwarded-port", "443",
+ "x-forwarded-proto", "https"));
+ return event;
+ }
+
+ @Override
+ protected boolean supportsContextPropagation() {
+ return false;
+ }
+
+ @Test
+ public void testBasicCall() {
+ doReturn(CoreConfiguration.EventType.ALL).when(config.getConfig(CoreConfiguration.class)).getCaptureBody();
+ getFunction().handleRequest(createInput(), context);
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
+ assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getNameAsString()).isEqualTo("FUNCTION_NAME");
+ assertThat(transaction.getType()).isEqualTo("request");
+ assertThat(transaction.getResult()).isEqualTo("HTTP 2xx");
+ assertThat(transaction.getOutcome()).isEqualTo(Outcome.SUCCESS);
+ assertThat(reporter.getPartialTransactions()).containsExactly(transaction);
+
+ Request request = transaction.getContext().getRequest();
+ assertThat(request.getMethod()).isEqualTo(HTTP_METHOD);
+ assertThat(request.getBody()).isNull();
+ assertThat(request.getHttpVersion()).isNull();
+
+ Url url = request.getUrl();
+ assertThat(url.getHostname()).isEqualTo("blabla.com");
+ assertThat(url.getPort()).isEqualTo(443);
+ assertThat(url.getPathname()).isEqualTo("/toolz/api/v2.0/downloadPDF/PDF_2020-09-11_11-06-01.pdf");
+ assertThat(url.getSearch()).contains("test%40key=test%40value");
+ assertThat(url.getSearch()).contains(Arrays.asList("language=en-DE", "test%40key=test%40value"));
+ assertThat(url.getProtocol()).isEqualTo("https");
+ String baseUrl = "https://" + "blabla.com" + "/toolz/api/v2.0/downloadPDF/PDF_2020-09-11_11-06-01.pdf" + "?";
+ assertThat(url.getFull().toString()).containsAnyOf(baseUrl + "test%40key=test%40value&language=en-DE",
+ baseUrl + "language=en-DE&test%40key=test%40value");
+
+ assertThat(request.getHeaders()).isNotNull();
+ PotentiallyMultiValuedMap headers = request.getHeaders();
+ assertThat(headers.get("connection")).isEqualTo("Keep-Alive");
+ assertThat(headers.get("accept-encoding")).isEqualTo("gzip,deflate");
+
+ Response response = transaction.getContext().getResponse();
+ assertThat(response.getStatusCode()).isEqualTo(ApiGatewayV1LambdaFunction.EXPECTED_STATUS_CODE);
+ assertThat(response.getHeaders()).isNotNull();
+ assertThat(response.getHeaders().get(ApiGatewayV1LambdaFunction.EXPECTED_RESPONSE_HEADER_1_KEY)).isEqualTo(ApiGatewayV1LambdaFunction.EXPECTED_RESPONSE_HEADER_1_VALUE);
+ assertThat(response.getHeaders().get(ApiGatewayV1LambdaFunction.EXPECTED_RESPONSE_HEADER_2_KEY)).isEqualTo(ApiGatewayV1LambdaFunction.EXPECTED_RESPONSE_HEADER_2_VALUE);
+
+ assertThat(transaction.getContext().getCloudOrigin()).isNotNull();
+ assertThat(transaction.getContext().getCloudOrigin().getProvider()).isEqualTo("aws");
+ assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isEqualTo("elb");
+ assertThat(transaction.getContext().getCloudOrigin().getAccountId()).isEqualTo("123456789012");
+ assertThat(transaction.getContext().getCloudOrigin().getRegion()).isEqualTo("us-east-2");
+
+ assertThat(transaction.getContext().getServiceOrigin().hasContent()).isTrue();
+ assertThat(transaction.getContext().getServiceOrigin().getName().toString()).isEqualTo("49e9d65c45c6791a");
+ assertThat(transaction.getContext().getServiceOrigin().getId()).isEqualTo("arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a");
+ assertThat(transaction.getContext().getServiceOrigin().getVersion()).isNull();
+
+ Faas faas = transaction.getFaas();
+ assertThat(faas.getExecution()).isEqualTo(TestContext.AWS_REQUEST_ID);
+ assertThat(faas.getId()).isEqualTo(TestContext.FUNCTION_ARN);
+ assertThat(faas.getTrigger().getType()).isEqualTo("http");
+ assertThat(faas.getTrigger().getRequestId()).isEqualTo("Root=1-xxxxxxxxxxxxxx");
+ }
+
+ @Test
+ public void testCallWithNullRequestContext() {
+ ApplicationLoadBalancerRequestEvent requestEvent = createInput();
+ requestEvent.setRequestContext(null);
+
+ getFunction().handleRequest(requestEvent, context);
+
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
+ assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getNameAsString()).isEqualTo(TestContext.FUNCTION_NAME);
+ assertThat(transaction.getType()).isEqualTo("request");
+ assertThat(transaction.getResult()).isEqualTo("HTTP 2xx");
+
+ assertThat(transaction.getContext().getCloudOrigin()).isNotNull();
+ assertThat(transaction.getContext().getCloudOrigin().getProvider()).isEqualTo("aws");
+
+ assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isEqualTo("elb");
+
+ assertThat(transaction.getContext().getCloudOrigin().getRegion()).isNull();
+ assertThat(transaction.getContext().getCloudOrigin().getAccountId()).isNull();
+
+ assertThat(transaction.getContext().getServiceOrigin().hasContent()).isFalse();
+
+ Faas faas = transaction.getFaas();
+ assertThat(faas.getExecution()).isEqualTo(TestContext.AWS_REQUEST_ID);
+
+ assertThat(faas.getTrigger().getType()).isEqualTo("http");
+ assertThat(faas.getTrigger().getRequestId()).isEqualTo("Root=1-xxxxxxxxxxxxxx");
+ }
+
+ @Test
+ public void testTransactionNameWithUsePathAsName() {
+ doReturn(true).when(config.getConfig(WebConfiguration.class)).isUsePathAsName();
+ getFunction().handleRequest(createInput(), context);
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ assertThat(reporter.getFirstTransaction().getNameAsString()).isEqualTo("POST /toolz/api/v2.0/downloadPDF/PDF_2020-09-11_11-06-01.pdf");
+ }
+
+}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/BaseGatewayLambdaTest.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/BaseGatewayLambdaTest.java
new file mode 100644
index 0000000000..22394fb6d6
--- /dev/null
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/BaseGatewayLambdaTest.java
@@ -0,0 +1,75 @@
+/*
+ * 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.awslambda;
+
+import co.elastic.apm.agent.awslambda.lambdas.TestContext;
+import co.elastic.apm.agent.impl.transaction.Faas;
+import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.tracer.Outcome;
+import org.junit.jupiter.api.Test;
+
+import java.util.Objects;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public abstract class BaseGatewayLambdaTest extends AbstractLambdaTest {
+
+ @Test
+ public void testCallWithNullInput() {
+ getFunction().handleRequest(null, context);
+
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
+ assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getNameAsString()).isEqualTo(TestContext.FUNCTION_NAME);
+ assertThat(transaction.getType()).isEqualTo("request");
+ assertThat(transaction.getResult()).isEqualTo("HTTP 2xx");
+
+ assertThat(transaction.getContext().getCloudOrigin()).isNotNull();
+ assertThat(transaction.getContext().getCloudOrigin().getProvider()).isEqualTo("aws");
+ assertThat(transaction.getContext().getCloudOrigin().getServiceName()).isNull();
+ assertThat(transaction.getContext().getCloudOrigin().getRegion()).isNull();
+ assertThat(transaction.getContext().getCloudOrigin().getAccountId()).isNull();
+
+ assertThat(transaction.getContext().getServiceOrigin().hasContent()).isFalse();
+
+ Faas faas = transaction.getFaas();
+ assertThat(faas.getExecution()).isEqualTo(TestContext.AWS_REQUEST_ID);
+
+ assertThat(faas.getTrigger().getType()).isEqualTo("other");
+ assertThat(faas.getTrigger().getRequestId()).isNull();
+ }
+
+
+ @Test
+ public void testCallWithErrorStatusCode() {
+ Objects.requireNonNull(context).setErrorStatusCode();
+ getFunction().handleRequest(createInput(), context);
+ reporter.awaitTransactionCount(1);
+ reporter.awaitSpanCount(1);
+ assertThat(reporter.getFirstSpan().getNameAsString()).isEqualTo("child-span");
+ assertThat(reporter.getFirstSpan().getTransaction()).isEqualTo(reporter.getFirstTransaction());
+ Transaction transaction = reporter.getFirstTransaction();
+ assertThat(transaction.getResult()).isEqualTo("HTTP 5xx");
+ assertThat(transaction.getOutcome()).isEqualTo(Outcome.FAILURE);
+ }
+
+}
diff --git a/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/lambdas/ApplicationLoadBalancerRequestLambdaFunction.java b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/lambdas/ApplicationLoadBalancerRequestLambdaFunction.java
new file mode 100644
index 0000000000..54dd61fa14
--- /dev/null
+++ b/apm-agent-plugins/apm-awslambda-plugin/src/test/java/co/elastic/apm/agent/awslambda/lambdas/ApplicationLoadBalancerRequestLambdaFunction.java
@@ -0,0 +1,52 @@
+/*
+ * 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.awslambda.lambdas;
+
+import com.amazonaws.services.lambda.runtime.Context;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerRequestEvent;
+import com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerResponseEvent;
+
+import java.util.Map;
+
+public class ApplicationLoadBalancerRequestLambdaFunction extends AbstractFunction {
+ public static final String EXPECTED_BODY = "This is some body";
+ public static final String EXPECTED_RESPONSE_HEADER_1_KEY = "EXPECTED_HEADER_1_KEY";
+ public static final String EXPECTED_RESPONSE_HEADER_1_VALUE = "EXPECTED_HEADER_1_VALUE";
+ public static final String EXPECTED_RESPONSE_HEADER_2_KEY = "EXPECTED_HEADER_2_KEY";
+ public static final String EXPECTED_RESPONSE_HEADER_2_VALUE = "EXPECTED_HEADER_2_VALUE";
+ public static final int EXPECTED_STATUS_CODE = 202;
+ public static final int ERROR_STATUS_CODE = 505;
+
+ @Override
+ public ApplicationLoadBalancerResponseEvent handleRequest(ApplicationLoadBalancerRequestEvent applicationLoadBalancerRequestEvent, Context context) {
+ createChildSpan();
+
+ ApplicationLoadBalancerResponseEvent response = new ApplicationLoadBalancerResponseEvent();
+ response.setBody(EXPECTED_BODY);
+ response.setHeaders(Map.of(EXPECTED_RESPONSE_HEADER_1_KEY, EXPECTED_RESPONSE_HEADER_1_VALUE, EXPECTED_RESPONSE_HEADER_2_KEY, EXPECTED_RESPONSE_HEADER_2_VALUE));
+
+ if (((TestContext) context).shouldSetErrorStatusCode()) {
+ response.setStatusCode(ERROR_STATUS_CODE);
+ } else {
+ response.setStatusCode(EXPECTED_STATUS_CODE);
+ }
+ raiseException(context);
+ return response;
+ }
+}
From 6c673b8f0ce062727ab5b84a45d4a7466f9957f1 Mon Sep 17 00:00:00 2001
From: Adrien Mannocci
Date: Mon, 25 Mar 2024 19:01:44 +0100
Subject: [PATCH 016/132] feat: new release process with PRs (#3567)
* feat: new release process with PRs
Signed-off-by: Adrien Mannocci
* chore: redirect to stderr for both message
Signed-off-by: Adrien Mannocci
* chore: apply suggest
Signed-off-by: Adrien Mannocci
* ci(chore): use env var instead of prefix v
Signed-off-by: Adrien Mannocci
* ci: use maven wrapper instead of direct maven
Signed-off-by: Adrien Mannocci
* feat: validate snapshot for snapshot workflow
Signed-off-by: Adrien Mannocci
* docs: add new release process
Signed-off-by: Adrien Mannocci
---------
Signed-off-by: Adrien Mannocci
---
.ci/release/post-release.sh | 31 +++
.ci/release/pre-release.sh | 22 ++
...major_branch.sh => update-major-branch.sh} | 7 +
.ci/release/update_cloudfoundry.sh | 28 ---
.ci/release/util.sh | 10 +-
.ci/release/wait_maven_artifact_published.sh | 13 --
.github/workflows/README.md | 6 +-
.github/workflows/pre-post-release.yml | 98 +++++++++
.github/workflows/pre-release.yml | 32 +++
.github/workflows/release.yml | 198 +++++++-----------
.github/workflows/snapshot.yml | 21 +-
.github/workflows/validate-tag/action.yml | 25 +++
.mvn/maven.config | 1 -
pom.xml | 14 +-
14 files changed, 326 insertions(+), 180 deletions(-)
create mode 100755 .ci/release/post-release.sh
create mode 100755 .ci/release/pre-release.sh
rename .ci/release/{update_major_branch.sh => update-major-branch.sh} (85%)
delete mode 100755 .ci/release/update_cloudfoundry.sh
delete mode 100755 .ci/release/wait_maven_artifact_published.sh
create mode 100644 .github/workflows/pre-post-release.yml
create mode 100644 .github/workflows/pre-release.yml
create mode 100644 .github/workflows/validate-tag/action.yml
diff --git a/.ci/release/post-release.sh b/.ci/release/post-release.sh
new file mode 100755
index 0000000000..e54662cdfe
--- /dev/null
+++ b/.ci/release/post-release.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# Bash strict mode
+set -euo pipefail
+
+# Found current script directory
+RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+# Found project directory
+BASE_PROJECT="$(dirname $(dirname "${RELATIVE_DIR}"))"
+
+# Import dependencies
+source "${RELATIVE_DIR}/util.sh"
+
+# Constants
+BASE_URL="https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent"
+CF_FILE="${BASE_PROJECT}/cloudfoundry/index.yml"
+
+# Requirements
+check_version "${RELEASE_VERSION}"
+
+echo "Set next snapshot version"
+./mvnw -V versions:set -DprocessAllModules=true -DgenerateBackupPoms=false -DnextSnapshot=true
+
+# make script idempotent if release is already in CF descriptor
+set +e
+grep -e "^${RELEASE_VERSION}:" ${CF_FILE}
+[[ $? == 0 ]] && exit 0
+set -e
+echo "Update cloudfoundry version"
+echo "${RELEASE_VERSION}: ${BASE_URL}/${RELEASE_VERSION}/elastic-apm-agent-${RELEASE_VERSION}.jar" >> "${CF_FILE}"
diff --git a/.ci/release/pre-release.sh b/.ci/release/pre-release.sh
new file mode 100755
index 0000000000..ae981a3dc9
--- /dev/null
+++ b/.ci/release/pre-release.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# Bash strict mode
+set -euo pipefail
+
+# Found current script directory
+RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+# Found project directory
+BASE_PROJECT="$(dirname $(dirname "${RELATIVE_DIR}"))"
+
+# Import dependencies
+source "${RELATIVE_DIR}/util.sh"
+
+# Requirements
+check_version "${RELEASE_VERSION}"
+
+echo "Set release version"
+./mvnw -V versions:set -DprocessAllModules=true -DgenerateBackupPoms=false -DnewVersion="${RELEASE_VERSION}"
+
+echo "Prepare changelog for release"
+java "${BASE_PROJECT}/.ci/ReleaseChangelog.java" CHANGELOG.asciidoc "${RELEASE_VERSION}"
diff --git a/.ci/release/update_major_branch.sh b/.ci/release/update-major-branch.sh
similarity index 85%
rename from .ci/release/update_major_branch.sh
rename to .ci/release/update-major-branch.sh
index 8fa883878b..146364f498 100755
--- a/.ci/release/update_major_branch.sh
+++ b/.ci/release/update-major-branch.sh
@@ -62,3 +62,10 @@ git checkout --force ${checkout_options}
echo -e "\n--- move local branch ${major_branch} to match tag ${tag}"
git reset --hard ${tag}
+
+echo -e "\n--- create new branch with updates"
+git checkout -b "update-major-${v}"
+git push origin "update-major-${v}"
+
+echo -e "\n--- create PR to update major branch"
+gh pr create --title="post release v${v}: update major branch" --base "${major_branch}" --head "update-major-${v}" -b "post release v${v}"
diff --git a/.ci/release/update_cloudfoundry.sh b/.ci/release/update_cloudfoundry.sh
deleted file mode 100755
index 436b5b2365..0000000000
--- a/.ci/release/update_cloudfoundry.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-source "$(dirname "${0}")/util.sh"
-
-REMOTE_NAME=origin
-BRANCH_NAME=main
-BASE_URL=https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent
-CF_FILE=cloudfoundry/index.yml
-
-check_version "${1:-}"
-v="${1:-}"
-
-echo -e "\n--- fetch & ensure clean state of ${REMOTE_NAME}/${BRANCH_NAME}"
-git fetch ${REMOTE_NAME} ${BRANCH_NAME}
-git checkout ${BRANCH_NAME}
-git reset --hard ${REMOTE_NAME}/${BRANCH_NAME}
-
-echo -e "\n--- update ${CF_FILE} if required"
-
-# make script idempotent if release is already in CF descriptor
-set +e
-grep -e "^${v}:" ${CF_FILE}
-[[ $? == 0 ]] && exit 0
-set -e
-
-echo "${v}: ${BASE_URL}/${v}/elastic-apm-agent-${v}.jar" >> ${CF_FILE}
-git commit ${CF_FILE} -m "Update cloudfoundry for ${v} release"
diff --git a/.ci/release/util.sh b/.ci/release/util.sh
index 8dd546ad93..f2cbf4a323 100644
--- a/.ci/release/util.sh
+++ b/.ci/release/util.sh
@@ -3,14 +3,12 @@
check_version() {
v=${1:-}
- if [[ "${v}" == "" ]]; then
- echo "usage $0 " # here $0 will be the calling script
- echo "where in format '1.2.3'"
+ if [ -z "${v}" ]; then
+ >&2 echo "The environment variable 'RELEASE_VERSION' isn't defined"
exit 1
fi
-
- if [[ ! "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
- echo "invalid version format '${v}'"
+ if [[ ! "${v}" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
+ >&2 echo "The environment variable 'RELEASE_VERSION' should respect SemVer format"
exit 1
fi
}
diff --git a/.ci/release/wait_maven_artifact_published.sh b/.ci/release/wait_maven_artifact_published.sh
deleted file mode 100755
index 7c12d96c22..0000000000
--- a/.ci/release/wait_maven_artifact_published.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-source "$(dirname "${0}")/util.sh"
-
-# returns '0' (zero) status code when artifact exists
-# return non-zero status when artifact does not exists or unable to execute request
-
-check_version "${1:-}"
-v="${1:-}"
-
-full_url="https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/${v}/elastic-apm-agent-${v}.pom"
-curl -fs "${full_url}" 2>&1 > /dev/null
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index d2d093d024..cbc0140d24 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -35,8 +35,12 @@ Every time there is a merge to main or any branches the whole workflow will comp
### Release process
-This process has been fully automated and it gets triggered manually when running the [release](https://github.com/elastic/apm-agent-java/actions/workflows/release.yml) workflow. It runs then a Buildkite pipeline in charge of generating and publishing the artifacts,
+To release a new version of apm-agent-java, you must use the two GitHub Workflows.
+Trigger the `Pre Release` workflow targeting the release version.
+After merging the PRs created by the first workflow, you can trigger the `Release` workflow targeting the release version.
+It runs then a Buildkite pipeline in charge of generating and publishing the artifacts,
for further details please go to [the buildkite folder](../../.buildkite/README.md).
+Finally, merge the PRs created to bump version for the next iteration.
The tag release follows the naming convention: `v...`, where ``, `` and ``.
diff --git a/.github/workflows/pre-post-release.yml b/.github/workflows/pre-post-release.yml
new file mode 100644
index 0000000000..e34026ebd4
--- /dev/null
+++ b/.github/workflows/pre-post-release.yml
@@ -0,0 +1,98 @@
+---
+
+name: Pre/Post Release
+
+on:
+ workflow_call:
+ inputs:
+ ref:
+ description: 'Branch or tag ref to run the workflow on'
+ type: string
+ required: true
+ default: "main"
+ version:
+ description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required version bumps'
+ type: string
+ required: true
+ phase:
+ description: 'Pre or post release phase'
+ type: string # valid values are 'pre' or 'post'
+ required: true
+
+env:
+ RELEASE_VERSION: ${{ inputs.version }}
+ RELEASE_VERSION_TAG: v${{ inputs.version }}
+ BRANCH_NAME: ${{ inputs.phase }}-release-v${{ inputs.version }}
+
+permissions:
+ contents: read
+
+jobs:
+ validate-tag:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Validate release tag does not exist in repo
+ uses: ./.github/workflows/validate-tag
+ with:
+ tag: ${{ env.RELEASE_VERSION_TAG }}
+
+ create-pr:
+ name: "Bump versions and create PR"
+ runs-on: ubuntu-latest
+ needs:
+ - validate-tag
+ permissions:
+ contents: write
+ steps:
+ - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
+ with:
+ url: ${{ secrets.VAULT_ADDR }}
+ roleId: ${{ secrets.VAULT_ROLE_ID }}
+ secretId: ${{ secrets.VAULT_SECRET_ID }}
+
+ - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
+ with:
+ username: ${{ env.GIT_USER }}
+ email: ${{ env.GIT_EMAIL }}
+ token: ${{ env.GITHUB_TOKEN }}
+
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.ref }}
+ token: ${{ env.GITHUB_TOKEN }}
+
+ - name: Create the release tag (post phase)
+ if: inputs.phase == 'post'
+ run: |
+ git tag "${{ env.RELEASE_VERSION_TAG }}"
+ git push origin "${{ env.RELEASE_VERSION_TAG }}"
+
+ - name: Create a ${{ inputs.phase }} release branch
+ run: git checkout -b ${{ env.BRANCH_NAME }}
+
+ - name: Perform pre release changes
+ if: inputs.phase == 'pre'
+ uses: ./.github/workflows/maven-goal-jdk
+ with:
+ command: ./.ci/release/pre-release.sh
+
+ - name: Perform post release changes
+ if: inputs.phase == 'post'
+ uses: ./.github/workflows/maven-goal
+ with:
+ command: ./.ci/release/post-release.sh
+
+ - name: Push the ${{ inputs.phase }} release branch
+ run: |
+ git add --all
+ git commit -m "${{ inputs.phase }} release: elastic-apm-agent ${{ env.RELEASE_VERSION_TAG }}"
+ git push origin ${{ env.BRANCH_NAME }}
+
+ - name: Create the ${{ inputs.phase }} release PR
+ run: gh pr create --title="${{ inputs.phase }} release ${{ env.RELEASE_VERSION_TAG }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.phase }} release ${{ env.RELEASE_VERSION_TAG }}"
+ env:
+ GH_TOKEN: ${{ env.GITHUB_TOKEN }}
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
new file mode 100644
index 0000000000..3fb0b6f71f
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,32 @@
+---
+
+name: Pre release
+
+on:
+ workflow_dispatch:
+ inputs:
+ ref:
+ description: 'Branch or tag ref to run the workflow on'
+ required: true
+ default: "main"
+ version:
+ description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required version bumps'
+ required: true
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}
+
+jobs:
+ pre-release:
+ name: "Bump versions and create PR"
+ uses: ./.github/workflows/pre-post-release.yml
+ permissions:
+ contents: write
+ with:
+ ref: ${{ inputs.ref }}
+ version: ${{ inputs.version }}
+ phase: 'pre'
+ secrets: inherit
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d15ea5f5bc..dc9a754f3e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,20 +5,13 @@ name: release
on:
workflow_dispatch:
inputs:
- branch:
- description: 'The branch to release'
+ ref:
+ description: 'Branch or tag ref to run the workflow on'
required: true
- default: 'main'
+ default: "main"
version:
description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required version bumps'
required: true
- update_changelog:
- description: |
- If enabled, everything in the changelog from the "Unreleased" section will be automatically moved to a new section for the new release.
- If disabled, the changelog needs to be prepared for the release manually before triggering this workflow.
- type: boolean
- required: true
- default: true
skip_preparation:
description: |
If enabled, the version bump, release notes update and tag creation will be skipped.
@@ -39,59 +32,48 @@ on:
default: false
type: boolean
-env:
- TAG_NAME: v${{ inputs.version }}
-
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}
+env:
+ RELEASE_VERSION: ${{ inputs.version }}
+ RELEASE_VERSION_TAG: v${{ inputs.version }}
+
jobs:
- prepare_release:
- permissions:
- contents: write
- name: "Changelog and Version Bump"
- if: ${{ ! inputs.skip_preparation }}
+ validate-tag:
runs-on: ubuntu-latest
steps:
- - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
+ - name: Checkout
+ uses: actions/checkout@v4
with:
- username: ${{ env.GIT_USER }}
- email: ${{ env.GIT_EMAIL }}
- token: ${{ env.GITHUB_TOKEN }}
- - uses: actions/checkout@v4
+ ref: ${{ inputs.ref }}
+ fetch-depth: 0
+ - name: Validate tag does not exist on current commit
+ uses: ./.github/workflows/validate-tag
with:
- ref: ${{ inputs.branch }}
- token: ${{ env.GITHUB_TOKEN }}
- - name: Install JDK and mvn clean
- uses: ./.github/workflows/maven-goal
- with:
- command: ./mvnw clean
- - name: Prepare changelog for release
- if: ${{ inputs.update_changelog && ! inputs.dry_run }}
+ tag: ${{ env.RELEASE_VERSION_TAG }}
+ - name: Validate tag match current version
run: |
- java .ci/ReleaseChangelog.java CHANGELOG.asciidoc ${{ inputs.version }}
- git commit -m "Prepare changelog for release ${{ inputs.version }}" CHANGELOG.asciidoc
- - name: Bump version and add git tag
- if: ${{ ! inputs.dry_run }}
- run: ./mvnw release:prepare -B -DpushChanges=false "-Darguments=-DskipTests -Dmaven.javadoc.skip=true" -DreleaseVersion=${{ inputs.version }}
- - name: Push changes
- if: ${{ ! inputs.dry_run }}
- run: git push --atomic origin ${{ inputs.branch }} ${{ env.TAG_NAME }}
+ if [ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" != "${{ env.RELEASE_VERSION }}" ]; then
+ echo "Tag should match pom.xml project.version"
+ exit 1
+ fi
+ - name: Validate version is a release version
+ run: |
+ if [[ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" =~ "-SNAPSHOT" ]]; then
+ echo "This is a snapshot version"
+ exit 1
+ fi
- maven_central_deploy:
+ maven-central-deploy:
name: "Deploy to Maven Central (Buildkite)"
if: ${{ ! inputs.skip_maven_deploy && ( inputs.skip_preparation || success() ) }}
runs-on: ubuntu-latest
needs:
- - prepare_release
+ - validate-tag
steps:
- id: buildkite
continue-on-error: true
@@ -102,61 +84,29 @@ jobs:
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-java-release
- pipelineCommit: ${{ env.TAG_NAME }}
+ pipelineCommit: ${{ env.RELEASE_VERSION }}
waitFor: true
printBuildLogs: false
buildEnvVars: |
dry_run=${{ inputs.dry_run || 'false' }}
- await_artifact_on_maven_central:
+ await-maven-central-artifact:
name: "Wait for artifacts to be available on maven central"
runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Await artifacts published in maven central
- if: ${{ ! inputs.dry_run }}
- shell: bash
- timeout-minutes: 120
- run: |
- until .ci/release/wait_maven_artifact_published.sh ${{ inputs.version }}
- do
- echo "Artifacts not found on maven central. Sleeping 30 seconds, retrying afterwards"
- sleep 30s
- done
-
- update_major_branch:
- name: "Update Major Branch"
- runs-on: ubuntu-latest
needs:
- - await_artifact_on_maven_central
- permissions:
- contents: write
+ - validate-tag
steps:
- - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
+ - uses: elastic/apm-pipeline-library/.github/actions/await-maven-artifact@current
with:
- username: ${{ env.GIT_USER }}
- email: ${{ env.GIT_EMAIL }}
- token: ${{ env.GITHUB_TOKEN }}
- - uses: actions/checkout@v4
- with:
- ref: ${{ env.TAG_NAME }}
- token: ${{ env.GITHUB_TOKEN }}
- - name: Update major branch
- run: .ci/release/update_major_branch.sh ${{ inputs.version }}
- - name: Push changes
- if: ${{ ! inputs.dry_run }}
- run: git push -f origin "$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')"
+ groupid: 'co.elastic.apm'
+ artifactid: 'elastic-apm-agent'
+ version: ${{ env.RELEASE_VERSION }}
- update_cloudfoundry:
- name: "Update Cloudfoundry"
+ update-major-branch:
+ name: "Update Major Branch"
runs-on: ubuntu-latest
needs:
- - await_artifact_on_maven_central
+ - await-maven-central-artifact
permissions:
contents: write
steps:
@@ -172,26 +122,23 @@ jobs:
token: ${{ env.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
- ref: ${{ inputs.branch }}
+ ref: ${{ inputs.ref }}
token: ${{ env.GITHUB_TOKEN }}
- - name: "Update Cloudfoundry index.yml file"
- shell: bash
- run: .ci/release/update_cloudfoundry.sh ${{ inputs.version }}
- - name: Push changes
+ - name: Update major branch
if: ${{ ! inputs.dry_run }}
- run: git push origin ${{ inputs.branch }}
+ run: .ci/release/update-major-branch.sh ${{ env.RELEASE_VERSION }}
- build_and_push_docker_images:
+ build-and-push-docker-images:
name: "Build and push docker images"
runs-on: ubuntu-latest
needs:
- - await_artifact_on_maven_central
+ - await-maven-central-artifact
env:
SONATYPE_FALLBACK: 1
steps:
- uses: actions/checkout@v4
with:
- ref: ${{ env.TAG_NAME }}
+ ref: ${{ inputs.ref }}
fetch-depth: 0 # Load entire history as it is required for the push-script
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
with:
@@ -208,11 +155,11 @@ jobs:
shell: bash
run: ./scripts/docker-release/push_docker.sh
- publish_aws_lambda:
+ publish-aws-lambda:
name: "Publish AWS Lambda"
runs-on: ubuntu-latest
needs:
- - await_artifact_on_maven_central
+ - await-maven-central-artifact
outputs:
arn_content: ${{ steps.arn_output.outputs.arn_content }}
env:
@@ -222,7 +169,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- ref: ${{ env.TAG_NAME }}
+ ref: ${{ inputs.ref }}
- name: Build Lambda-layer zip using agent from maven-central
uses: ./.github/workflows/maven-goal
with:
@@ -240,7 +187,7 @@ jobs:
if: ${{ ! inputs.dry_run }}
run: |
# Convert v1.2.3 to ver-1-2-3
- VERSION=${TAG_NAME/v/ver-}
+ VERSION=${RELEASE_VERSION/v/ver-}
VERSION=${VERSION//./-}
ELASTIC_LAYER_NAME="elastic-apm-java-${VERSION}" .ci/publish-aws.sh
@@ -257,11 +204,11 @@ jobs:
cat .ci/.arn-file.md >> $GITHUB_OUTPUT
echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT
- create_github_release:
+ create-github-release:
name: "Create GitHub Release"
needs:
- - publish_aws_lambda
- - update_major_branch
+ - publish-aws-lambda
+ - update-major-branch
runs-on: ubuntu-latest
if: ${{ ! inputs.dry_run }}
permissions:
@@ -269,39 +216,52 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- ref: ${{ env.TAG_NAME }}
+ ref: ${{ inputs.ref }}
- name: Await release-notes published
shell: bash
timeout-minutes: 120
run: |
- until .ci/release/wait_release_notes_published.sh ${{ inputs.version }}
+ until .ci/release/wait_release_notes_published.sh ${{ env.RELEASE_VERSION }}
do
echo "Release notes not published yet. Sleeping 30 seconds, retrying afterwards"
sleep 30s
done
- name: Compute major.x branch
id: get_dotx_branch
- run: echo "dotx_branch=$(echo '${{ inputs.version }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT
+ run: echo "dotx_branch=$(echo '${{ env.RELEASE_VERSION }}' | sed -E 's/\..+/.x/')" >> $GITHUB_OUTPUT
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
- gh release create ${{ env.TAG_NAME }} \
- --title="Release ${{ inputs.version }}" \
- --notes="[Release Notes for ${{ inputs.version }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ inputs.version }})
- ${{ needs.publish_aws_lambda.outputs.arn_content }}"
+ gh release create ${{ env.RELEASE_VERSION }} \
+ --title="Release ${{ env.RELEASE_VERSION }}" \
+ --notes="[Release Notes for ${{ env.RELEASE_VERSION }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ env.RELEASE_VERSION }})
+ ${{ needs.publish-aws-lambda.outputs.arn_content }}"
+
+ post-release:
+ name: "Bump versions and create PR"
+ needs:
+ - await-maven-central-artifact
+ uses: ./.github/workflows/pre-post-release.yml
+ permissions:
+ contents: write
+ if: inputs.dry_run == false
+ with:
+ ref: ${{ inputs.ref }}
+ version: ${{ env.RELEASE_VERSION }}
+ phase: 'post'
+ secrets: inherit
notify:
if: ${{ always() && ! inputs.dry_run }}
needs:
- - prepare_release
- - maven_central_deploy
- - await_artifact_on_maven_central
- - update_major_branch
- - update_cloudfoundry
- - build_and_push_docker_images
- - publish_aws_lambda
- - create_github_release
+ - maven-central-deploy
+ - await-maven-central-artifact
+ - update-major-branch
+ - build-and-push-docker-images
+ - publish-aws-lambda
+ - post-release
+ - create-github-release
runs-on: ubuntu-latest
steps:
- id: check
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 86d6353476..9a50021824 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -16,10 +16,29 @@ permissions:
contents: read
jobs:
+ validate:
+ runs-on: ubuntu-latest
+ outputs:
+ is-snapshot: ${{ steps.validate-step.outputs.is-snapshot }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Validate version is a snapshot version
+ id: validate-step
+ run: |
+ output=false
+ if [[ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" =~ "-SNAPSHOT" ]]; then
+ echo "This is a snapshot version"
+ output=true
+ fi
+ echo "is-snapshot=${output}" >> "$GITHUB_OUTPUT"
+
deploy:
name: Deploy
runs-on: ubuntu-latest
-
+ needs:
+ - validate
+ if: ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
steps:
- id: buildkite
name: Run Deploy
diff --git a/.github/workflows/validate-tag/action.yml b/.github/workflows/validate-tag/action.yml
new file mode 100644
index 0000000000..1cdb8ef5c3
--- /dev/null
+++ b/.github/workflows/validate-tag/action.yml
@@ -0,0 +1,25 @@
+---
+
+name: validate-tag
+description: Validate tag format
+
+inputs:
+ tag:
+ description: 'Tag to validate'
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Validate tag does not exist on current commit
+ id: validate-tag
+ shell: 'bash'
+ run: |
+ if ! [ $(echo "${{ inputs.tag }}" | grep -P "(\d{1,2})\.(\d{1,2})\.(\d{1,2})") ]; then
+ echo "Tag should be a SemVer format"
+ exit 1
+ fi
+ if [ $(git tag -l "${{ inputs.tag }}") ]; then
+ echo "The tag ${{ inputs.tag }} already exists"
+ exit 1
+ fi
diff --git a/.mvn/maven.config b/.mvn/maven.config
index f50bb0f948..7c3456d7e4 100644
--- a/.mvn/maven.config
+++ b/.mvn/maven.config
@@ -1,4 +1,3 @@
--V
-B
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-Dhttps.protocols=TLSv1.2
diff --git a/pom.xml b/pom.xml
index 55daeaac73..2ec5eced20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -380,17 +380,9 @@
- maven-release-plugin
-
- false
- gpg
- true
- v@{project.version}
-
- **/apm-agent-benchmarks/src/main/resources/**
- **/apm-agent-plugins/apm-profiling-plugin/src/main/resources/**
-
-
+ org.codehaus.mojo
+ versions-maven-plugin
+ 2.16.2
org.sonatype.plugins
From 5b6792421f59be9adc95504c586ee661918259b7 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 2 Apr 2024 09:22:13 +0200
Subject: [PATCH 017/132] Bump version.aws.sdk from 2.25.0 to 2.25.21 in
/apm-agent-plugins (#3574)
Bumps `version.aws.sdk` from 2.25.0 to 2.25.21.
Updates `software.amazon.awssdk:s3` from 2.25.0 to 2.25.21
Updates `software.amazon.awssdk:sqs` from 2.25.0 to 2.25.21
Updates `software.amazon.awssdk:dynamodb` from 2.25.0 to 2.25.21
---
updated-dependencies:
- dependency-name: software.amazon.awssdk:s3
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:sqs
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:dynamodb
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 7b3a044eb3..62aefeded8 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
@@ -13,7 +13,7 @@
${project.basedir}/../../..
- 2.25.0
+ 2.25.21
2.0.0
8
From a10ecd4698374bbba39cf72703e6c7290f9f17cb Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 2 Apr 2024 10:12:11 +0200
Subject: [PATCH 018/132] Bump org.awaitility:awaitility from 4.2.0 to 4.2.1
(#3573)
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.0 to 4.2.1.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.0...awaitility-4.2.1)
---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
integration-tests/runtime-attach/runtime-attach-test/pom.xml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/integration-tests/runtime-attach/runtime-attach-test/pom.xml b/integration-tests/runtime-attach/runtime-attach-test/pom.xml
index 203e031971..4ab75d5835 100644
--- a/integration-tests/runtime-attach/runtime-attach-test/pom.xml
+++ b/integration-tests/runtime-attach/runtime-attach-test/pom.xml
@@ -31,7 +31,7 @@
org.awaitility
awaitility
- 4.2.0
+ 4.2.1
test
diff --git a/pom.xml b/pom.xml
index 2ec5eced20..dccc732203 100644
--- a/pom.xml
+++ b/pom.xml
@@ -809,7 +809,7 @@
org.awaitility
awaitility
- 4.2.0
+ 4.2.1
test
From 2e1bce7fe994efac07a72dc6162b6824f11ee5bf Mon Sep 17 00:00:00 2001
From: jackshirazi
Date: Tue, 2 Apr 2024 11:25:53 +0100
Subject: [PATCH 019/132] Add exclusion list option for calling
DatabaseMetaData.getUserName (#3568)
* use a dummy user for testing
* exclusion list option for calling getUserName
* changelog and test break fixed
---
CHANGELOG.asciidoc | 1 +
.../agent/jdbc/helper/JdbcConfiguration.java | 52 +++++++++++++
.../apm/agent/jdbc/helper/JdbcHelper.java | 21 ++++-
....configuration.ConfigurationOptionProvider | 1 +
.../helper/JdbcGetUserNameExclusionTest.java | 77 +++++++++++++++++++
5 files changed, 151 insertions(+), 1 deletion(-)
create mode 100644 apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcConfiguration.java
create mode 100644 apm-agent-plugins/apm-jdbc-plugin/src/main/resources/META-INF/services/org.stagemonitor.configuration.ConfigurationOptionProvider
create mode 100644 apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/helper/JdbcGetUserNameExclusionTest.java
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 35349f1556..6b92fe1bdb 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -39,6 +39,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
===== Features
* Differentiate Lambda URLs from API Gateway in AWS Lambda integration - {pull}3417[#3417]
* Added lambda support for ELB triggers {pull}#3411[#3411]
+* Add exclusion list option for calling DatabaseMetaData.getUserName - {pull}#3568[#3568]
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcConfiguration.java b/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcConfiguration.java
new file mode 100644
index 0000000000..87dcfb976d
--- /dev/null
+++ b/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcConfiguration.java
@@ -0,0 +1,52 @@
+/*
+ * 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.jdbc.helper;
+
+import co.elastic.apm.agent.common.util.WildcardMatcher;
+import co.elastic.apm.agent.tracer.configuration.WildcardMatcherValueConverter;
+import org.stagemonitor.configuration.ConfigurationOption;
+import org.stagemonitor.configuration.ConfigurationOptionProvider;
+import org.stagemonitor.configuration.converter.DoubleValueConverter;
+import org.stagemonitor.configuration.converter.ListValueConverter;
+import org.stagemonitor.configuration.converter.StringValueConverter;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class JdbcConfiguration extends ConfigurationOptionProvider {
+
+ private final ConfigurationOption> databaseMetaDataExclusionList = ConfigurationOption
+ .builder(new ListValueConverter(StringValueConverter.INSTANCE), List.class)
+ .key("exclude_from_getting_username")
+ .configurationCategory("Datastore")
+ .description("If any of these strings match part of the package or class name of the DatabaseMetaData instance, getUserName() won't be called" +
+ "\n" +
+ WildcardMatcher.DOCUMENTATION
+ )
+ .tags("internal","added[1.49.0]")
+ .dynamic(true)
+ .buildWithDefault(Arrays.asList(
+ "hikari"
+ ));
+
+ public List getDatabaseMetaDataExclusionList() {
+ return databaseMetaDataExclusionList.get();
+ }
+
+}
diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcHelper.java b/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcHelper.java
index 6853a14088..ca8f379e40 100644
--- a/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcHelper.java
+++ b/apm-agent-plugins/apm-jdbc-plugin/src/main/java/co/elastic/apm/agent/jdbc/helper/JdbcHelper.java
@@ -21,18 +21,21 @@
import co.elastic.apm.agent.sdk.internal.db.signature.Scanner;
import co.elastic.apm.agent.sdk.internal.db.signature.SignatureParser;
import co.elastic.apm.agent.tracer.AbstractSpan;
+import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.tracer.Span;
import co.elastic.apm.agent.tracer.ElasticContext;
import co.elastic.apm.agent.jdbc.JdbcFilter;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakMap;
+import co.elastic.apm.agent.tracer.Tracer;
import javax.annotation.Nullable;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.sql.Statement;
+import java.util.List;
import java.util.concurrent.Callable;
import static co.elastic.apm.agent.jdbc.helper.JdbcGlobalState.metaDataMap;
@@ -45,6 +48,11 @@ public class JdbcHelper {
public static final String DB_SPAN_ACTION = "query";
private static final JdbcHelper INSTANCE = new JdbcHelper();
+ private final JdbcConfiguration config;
+
+ public JdbcHelper() {
+ this.config = GlobalTracer.get().getConfig(JdbcConfiguration.class);
+ }
public static JdbcHelper get() {
return INSTANCE;
@@ -181,7 +189,7 @@ private ConnectionMetaData getConnectionMetaData(@Nullable Connection connection
DatabaseMetaData metaData = connection.getMetaData();
connectionMetaData = ConnectionMetaData.parse(metaData.getURL())
.withConnectionInstance(safeGetCatalog(connection))
- .withConnectionUser(metaData.getUserName())
+ .withConnectionUser(maybeGetUserName(metaData, config))
.build();
if (logger.isDebugEnabled()) {
@@ -201,6 +209,17 @@ private ConnectionMetaData getConnectionMetaData(@Nullable Connection connection
return connectionMetaData;
}
+ static String maybeGetUserName(DatabaseMetaData metaData, JdbcConfiguration config) throws SQLException {
+ List exclusionList = config.getDatabaseMetaDataExclusionList();
+ String classname = metaData.getClass().getName();
+ for (String exclude : exclusionList) {
+ if (classname.contains(exclude)) {
+ return null;
+ }
+ }
+ return metaData.getUserName();
+ }
+
@Nullable
private String safeGetCatalog(Connection connection) {
String catalog = null;
diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/main/resources/META-INF/services/org.stagemonitor.configuration.ConfigurationOptionProvider b/apm-agent-plugins/apm-jdbc-plugin/src/main/resources/META-INF/services/org.stagemonitor.configuration.ConfigurationOptionProvider
new file mode 100644
index 0000000000..38d62b1c55
--- /dev/null
+++ b/apm-agent-plugins/apm-jdbc-plugin/src/main/resources/META-INF/services/org.stagemonitor.configuration.ConfigurationOptionProvider
@@ -0,0 +1 @@
+co.elastic.apm.agent.jdbc.helper.JdbcConfiguration
diff --git a/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/helper/JdbcGetUserNameExclusionTest.java b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/helper/JdbcGetUserNameExclusionTest.java
new file mode 100644
index 0000000000..5ff0962629
--- /dev/null
+++ b/apm-agent-plugins/apm-jdbc-plugin/src/test/java/co/elastic/apm/agent/jdbc/helper/JdbcGetUserNameExclusionTest.java
@@ -0,0 +1,77 @@
+/*
+ * 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.jdbc.helper;
+
+import co.elastic.apm.agent.AbstractInstrumentationTest;
+import co.elastic.apm.agent.MockTracer;
+import co.elastic.apm.agent.bci.ElasticApmAgent;
+import co.elastic.apm.agent.configuration.SpyConfiguration;
+import co.elastic.apm.agent.impl.ElasticApmTracer;
+import net.bytebuddy.agent.ByteBuddyAgent;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.stagemonitor.configuration.ConfigurationRegistry;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.util.List;
+
+import static co.elastic.apm.agent.testutils.assertions.Assertions.assertThat;
+import static org.mockito.Mockito.doReturn;
+
+public class JdbcGetUserNameExclusionTest extends AbstractInstrumentationTest {
+
+ protected static JdbcConfiguration jdbcconfig;
+
+ @Test
+ public void hasUsernameCorrectlyExcludes() throws SQLException {
+ DatabaseMetaData meta = (DatabaseMetaData) Proxy.newProxyInstance(
+ this.getClass().getClassLoader(),
+ new Class[] { DatabaseMetaData.class },
+ new MetadataInvocationHandler());
+
+ assertThat(JdbcHelper.maybeGetUserName(meta, config.getConfig(JdbcConfiguration.class))).isEqualTo("testuser");
+
+ String classname = meta.getClass().getName();
+ String excludeName = classname.substring(classname.indexOf('$')+1);
+ doReturn(List.of(excludeName))
+ .when(config.getConfig(JdbcConfiguration.class))
+ .getDatabaseMetaDataExclusionList();
+
+ assertThat(JdbcHelper.maybeGetUserName(meta, config.getConfig(JdbcConfiguration.class))).isEqualTo(null);
+ }
+
+ public class MetadataInvocationHandler implements InvocationHandler {
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if (method.getName().equals("getUserName")) {
+ return "testuser";
+ }
+ return null;
+ }
+ }
+
+}
From a3709b73dcefbd20d189ee23d9789a6c3f82e6c6 Mon Sep 17 00:00:00 2001
From: apmmachine <58790750+apmmachine@users.noreply.github.com>
Date: Tue, 2 Apr 2024 08:07:03 -0400
Subject: [PATCH 020/132] pre release: elastic-apm-agent v1.49.0 (#3576)
Co-authored-by: apmmachine
---
CHANGELOG.asciidoc | 9 ++++++---
apm-agent-api/pom.xml | 2 +-
apm-agent-attach-cli/pom.xml | 2 +-
apm-agent-attach/pom.xml | 2 +-
apm-agent-benchmarks/pom.xml | 2 +-
apm-agent-bootstrap/pom.xml | 2 +-
apm-agent-builds/apm-agent-java8/pom.xml | 2 +-
apm-agent-builds/apm-agent/pom.xml | 2 +-
apm-agent-builds/pom.xml | 2 +-
apm-agent-cached-lookup-key/pom.xml | 2 +-
apm-agent-common/pom.xml | 2 +-
apm-agent-core/pom.xml | 2 +-
apm-agent-lambda-layer/pom.xml | 2 +-
apm-agent-plugin-sdk/pom.xml | 2 +-
.../apm-apache-httpclient-common/pom.xml | 2 +-
.../apm-apache-httpclient3-plugin/pom.xml | 2 +-
.../apm-apache-httpclient4-plugin/pom.xml | 2 +-
.../apm-apache-httpclient5-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-apache-httpclient/pom.xml | 2 +-
apm-agent-plugins/apm-api-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml | 2 +-
.../apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml | 2 +-
.../apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/pom.xml | 2 +-
apm-agent-plugins/apm-awslambda-plugin/pom.xml | 2 +-
.../apm-cassandra/apm-cassandra-core-plugin/pom.xml | 2 +-
.../apm-cassandra/apm-cassandra3-plugin/pom.xml | 2 +-
.../apm-cassandra/apm-cassandra4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/pom.xml | 2 +-
apm-agent-plugins/apm-dubbo-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-ecs-logging-plugin/pom.xml | 2 +-
.../apm-es-restclient-plugin-5_6/pom.xml | 2 +-
.../apm-es-restclient-plugin-6_4/pom.xml | 2 +-
.../apm-es-restclient-plugin-7_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-8_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-es-restclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grails-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/pom.xml | 2 +-
.../apm-hibernate-search-plugin-5_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-6_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-hibernate-search-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-httpclient-core/pom.xml | 2 +-
apm-agent-plugins/apm-httpserver-core/pom.xml | 2 +-
apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-concurrent-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-ldap-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-javalin-plugin/pom.xml | 2 +-
.../apm-jaxrs-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxrs-plugin/pom.xml | 2 +-
.../apm-jaxws-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxws-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdbc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml | 2 +-
.../apm-jms-plugin/apm-jms-plugin-base/pom.xml | 2 +-
.../apm-jms-plugin/apm-jms-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jmx-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jsf-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-base-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-kafka-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-jboss-logging-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-jul-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-log4j1-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-log4j2-plugin/pom.xml | 2 +-
.../apm-logback-plugin/apm-logback-plugin-impl/pom.xml | 2 +-
.../apm-logback-plugin-legacy-tests/pom.xml | 2 +-
.../apm-logging-plugin/apm-logback-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-logging-plugin-common/pom.xml | 2 +-
.../apm-logging-plugin/apm-slf4j-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-micrometer-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml | 2 +-
.../apm-mongodb/apm-mongodb3-plugin/pom.xml | 2 +-
.../apm-mongodb/apm-mongodb4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-test/pom.xml | 2 +-
.../apm-opentelemetry-embedded-metrics-sdk/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-common/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-latest/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-v1_14/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-parent/pom.xml | 2 +-
.../apm-opentelemetry-metricsdk-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-test/pom.xml | 2 +-
apm-agent-plugins/apm-opentelemetry/pom.xml | 2 +-
apm-agent-plugins/apm-opentracing-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-process-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-profiling-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/pom.xml | 2 +-
.../apm-rabbitmq/apm-rabbitmq-plugin/pom.xml | 2 +-
.../apm-rabbitmq/apm-rabbitmq-spring/pom.xml | 2 +-
.../apm-rabbitmq/apm-rabbitmq-test-3/pom.xml | 2 +-
.../apm-rabbitmq/apm-rabbitmq-test-4/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/pom.xml | 2 +-
apm-agent-plugins/apm-reactor-plugin/pom.xml | 2 +-
.../apm-redis-plugin/apm-jedis-2-tests/pom.xml | 2 +-
.../apm-redis-plugin/apm-jedis-3-tests/pom.xml | 2 +-
.../apm-redis-plugin/apm-jedis-4-plugin/pom.xml | 2 +-
.../apm-redis-plugin/apm-jedis-5-tests/pom.xml | 2 +-
.../apm-redis-plugin/apm-jedis-plugin/pom.xml | 2 +-
.../apm-redis-plugin/apm-lettuce-3-tests/pom.xml | 2 +-
.../apm-redis-plugin/apm-lettuce-plugin/pom.xml | 2 +-
.../apm-redis-plugin/apm-redis-common/pom.xml | 2 +-
.../apm-redis-plugin/apm-redisson-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml | 2 +-
.../pom.xml | 2 +-
.../apm-scheduled-annotation-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-jakarta-test/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-sparkjava-plugin/pom.xml | 2 +-
.../apm-spring-restclient-test/pom.xml | 2 +-
.../apm-spring-resttemplate-plugin/pom.xml | 2 +-
.../apm-spring-resttemplate-test/pom.xml | 2 +-
apm-agent-plugins/apm-spring-resttemplate/pom.xml | 2 +-
.../apm-spring-webclient-plugin/pom.xml | 2 +-
.../apm-spring-webflux-common-spring5/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-common/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-plugin/pom.xml | 2 +-
.../apm-spring-webflux-spring5/pom.xml | 2 +-
.../apm-spring-webflux-testapp/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webmvc/pom.xml | 2 +-
apm-agent-plugins/apm-struts-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-urlconnection-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml | 2 +-
.../apm-vertx/apm-vertx3-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/pom.xml | 2 +-
apm-agent-plugins/pom.xml | 2 +-
apm-agent-tracer/pom.xml | 2 +-
apm-opentracing/pom.xml | 2 +-
elastic-apm-agent-java8/pom.xml | 2 +-
elastic-apm-agent-premain/pom.xml | 2 +-
elastic-apm-agent/pom.xml | 2 +-
.../application-server-integration-tests/pom.xml | 2 +-
integration-tests/aws-lambda-test/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-dependent/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-standalone/pom.xml | 2 +-
integration-tests/cdi-app/pom.xml | 2 +-
.../cdi-jakartaee-app-dependent/pom.xml | 2 +-
.../cdi-jakartaee-app-standalone/pom.xml | 2 +-
integration-tests/cdi-jakartaee-app/pom.xml | 2 +-
.../external-plugin-otel-test-app/pom.xml | 2 +-
.../external-plugin-otel-test-plugin1/pom.xml | 2 +-
.../external-plugin-otel-test-plugin2/pom.xml | 2 +-
integration-tests/external-plugin-otel-test/pom.xml | 2 +-
.../external-plugin-test/external-plugin-app/pom.xml | 2 +-
.../external-plugin-jakarta-app/pom.xml | 2 +-
.../external-plugin-test/external-plugin/pom.xml | 2 +-
.../plugin-instrumentation-target/pom.xml | 2 +-
integration-tests/external-plugin-test/pom.xml | 2 +-
.../jakartaee-jsf-app-dependent/pom.xml | 2 +-
.../jakartaee-jsf-app-standalone/pom.xml | 2 +-
integration-tests/jakartaee-jsf-app/pom.xml | 2 +-
integration-tests/jakartaee-simple-webapp/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-dependent/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-standalone/pom.xml | 2 +-
integration-tests/jsf-app/pom.xml | 2 +-
integration-tests/main-app-test/pom.xml | 2 +-
integration-tests/pom.xml | 2 +-
integration-tests/quarkus/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-base/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml | 2 +-
integration-tests/runtime-attach/pom.xml | 2 +-
.../runtime-attach/runtime-attach-app/pom.xml | 2 +-
.../runtime-attach/runtime-attach-test/pom.xml | 2 +-
integration-tests/simple-webapp/pom.xml | 2 +-
integration-tests/soap-test/pom.xml | 2 +-
integration-tests/spring-boot-1-5/pom.xml | 2 +-
integration-tests/spring-boot-2/pom.xml | 2 +-
.../spring-boot-2/spring-boot-2-base/pom.xml | 2 +-
.../spring-boot-2/spring-boot-2-jetty/pom.xml | 2 +-
.../spring-boot-2/spring-boot-2-tomcat/pom.xml | 2 +-
.../spring-boot-2/spring-boot-2-undertow/pom.xml | 2 +-
integration-tests/spring-boot-3/pom.xml | 2 +-
.../spring-boot-3/spring-boot-3-jetty/pom.xml | 2 +-
.../spring-boot-3/spring-boot-3-tomcat/pom.xml | 2 +-
.../spring-boot-3/spring-boot-3-undertow/pom.xml | 2 +-
pom.xml | 2 +-
201 files changed, 206 insertions(+), 203 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6b92fe1bdb..44b9c2f8e5 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,12 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
+[[release-notes-1.x]]
+=== Java Agent version 1.x
+
+[[release-notes-1.49.0]]
+==== 1.49.0 - 2024/04/02
+
[float]
===== Bug fixes
* Fixed problems with public API annotation inheritance - {pull}3551[#3551]
@@ -41,9 +47,6 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
* Added lambda support for ELB triggers {pull}#3411[#3411]
* Add exclusion list option for calling DatabaseMetaData.getUserName - {pull}#3568[#3568]
-[[release-notes-1.x]]
-=== Java Agent version 1.x
-
[[release-notes-1.48.1]]
==== 1.48.1 - 2024/03/06
diff --git a/apm-agent-api/pom.xml b/apm-agent-api/pom.xml
index dc56879084..7c967db31a 100644
--- a/apm-agent-api/pom.xml
+++ b/apm-agent-api/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-api
diff --git a/apm-agent-attach-cli/pom.xml b/apm-agent-attach-cli/pom.xml
index 49d3761542..461dbf4dc2 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-attach/pom.xml b/apm-agent-attach/pom.xml
index 44bb4d3407..32da5d5c25 100644
--- a/apm-agent-attach/pom.xml
+++ b/apm-agent-attach/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-attach
diff --git a/apm-agent-benchmarks/pom.xml b/apm-agent-benchmarks/pom.xml
index 05a9398e17..142bf7c9fb 100644
--- a/apm-agent-benchmarks/pom.xml
+++ b/apm-agent-benchmarks/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-benchmarks
diff --git a/apm-agent-bootstrap/pom.xml b/apm-agent-bootstrap/pom.xml
index e2977db54c..bc2d76aa63 100644
--- a/apm-agent-bootstrap/pom.xml
+++ b/apm-agent-bootstrap/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-bootstrap
diff --git a/apm-agent-builds/apm-agent-java8/pom.xml b/apm-agent-builds/apm-agent-java8/pom.xml
index f7a80a7819..47dccec352 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.48.2-SNAPSHOT
+ 1.49.0
apm-agent-java8
diff --git a/apm-agent-builds/apm-agent/pom.xml b/apm-agent-builds/apm-agent/pom.xml
index 03aa5bbf66..f04515c0a2 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.48.2-SNAPSHOT
+ 1.49.0
apm-agent
diff --git a/apm-agent-builds/pom.xml b/apm-agent-builds/pom.xml
index 2d64440819..bda0b824cd 100644
--- a/apm-agent-builds/pom.xml
+++ b/apm-agent-builds/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-cached-lookup-key/pom.xml b/apm-agent-cached-lookup-key/pom.xml
index 8f214a8b1f..3f910cf4f6 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-common/pom.xml b/apm-agent-common/pom.xml
index e57ab1abce..6842b66afc 100644
--- a/apm-agent-common/pom.xml
+++ b/apm-agent-common/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index a3ed72483d..61dec83244 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-core
diff --git a/apm-agent-lambda-layer/pom.xml b/apm-agent-lambda-layer/pom.xml
index 00279d5bbd..2632f74b45 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugin-sdk/pom.xml b/apm-agent-plugin-sdk/pom.xml
index 8373fd913b..88840de213 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
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 09b244f874..70a1c86efa 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.48.2-SNAPSHOT
+ 1.49.0
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 26badce88b..e200ba4293 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.48.2-SNAPSHOT
+ 1.49.0
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 e1e3d3d799..ad7f1b9375 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.48.2-SNAPSHOT
+ 1.49.0
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 912cd34205..53c1f0445d 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.48.2-SNAPSHOT
+ 1.49.0
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 13039a2137..db5fea7c42 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.48.2-SNAPSHOT
+ 1.49.0
apm-apache-httpclient
diff --git a/apm-agent-plugins/apm-api-plugin/pom.xml b/apm-agent-plugins/apm-api-plugin/pom.xml
index 9bbf32fc0a..2fa06b2262 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.48.2-SNAPSHOT
+ 1.49.0
diff --git a/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml b/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml
index d16146a415..963d44ac35 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.48.2-SNAPSHOT
+ 1.49.0
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 9ce3564a88..2befe6bdad 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.48.2-SNAPSHOT
+ 1.49.0
4.0.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 62aefeded8..6297842308 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
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 3d3f0de94e..a48a31ae96 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-aws-sdk/pom.xml b/apm-agent-plugins/apm-aws-sdk/pom.xml
index 5cf7a1e724..6196ff5d40 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-awslambda-plugin/pom.xml b/apm-agent-plugins/apm-awslambda-plugin/pom.xml
index f4819bbdeb..405bb4a42b 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.48.2-SNAPSHOT
+ 1.49.0
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 52ada94e7e..be3fbb0565 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.48.2-SNAPSHOT
+ 1.49.0
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 1c48a45f4b..f8ad869438 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.48.2-SNAPSHOT
+ 1.49.0
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 977e380899..1130b7ff35 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-cassandra/pom.xml b/apm-agent-plugins/apm-cassandra/pom.xml
index 28412125b2..a6fcd2e7a1 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-dubbo-plugin/pom.xml b/apm-agent-plugins/apm-dubbo-plugin/pom.xml
index 8b62725169..bef2e71d9e 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.48.2-SNAPSHOT
+ 1.49.0
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 5644c1d34d..794c55ad97 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.48.2-SNAPSHOT
+ 1.49.0
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 aaf43fd306..e3145e447e 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.48.2-SNAPSHOT
+ 1.49.0
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 7d8b0b7284..d3ce291f35 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.48.2-SNAPSHOT
+ 1.49.0
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 9149b883fb..972d0f081f 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.48.2-SNAPSHOT
+ 1.49.0
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 997ab85f8a..cba4d9d614 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.48.2-SNAPSHOT
+ 1.49.0
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 40dadf3324..11191c15d0 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.48.2-SNAPSHOT
+ 1.49.0
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 afd404b925..284c69814d 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.48.2-SNAPSHOT
+ 1.49.0
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 959f055bcf..c5282b5a39 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.48.2-SNAPSHOT
+ 1.49.0
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 dd04a58d3a..395750bc79 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.48.2-SNAPSHOT
+ 1.49.0
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 1cd687415b..cce2de5dc1 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.48.2-SNAPSHOT
+ 1.49.0
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 49a7d51de1..fc32f566a9 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.48.2-SNAPSHOT
+ 1.49.0
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 f583d33fba..216087d7a8 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.48.2-SNAPSHOT
+ 1.49.0
apm-grpc-test-latest
diff --git a/apm-agent-plugins/apm-grpc/pom.xml b/apm-agent-plugins/apm-grpc/pom.xml
index 1ab7d2d4a1..759c1f1320 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.48.2-SNAPSHOT
+ 1.49.0
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 00ad479bc5..8f48e364f7 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.48.2-SNAPSHOT
+ 1.49.0
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 af31592546..ab99217b36 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.48.2-SNAPSHOT
+ 1.49.0
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 c6c8482f39..e5ad36c01d 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.48.2-SNAPSHOT
+ 1.49.0
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 d0a531299d..e87bec250b 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.48.2-SNAPSHOT
+ 1.49.0
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 f3030694a4..6f0e154bc2 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.48.2-SNAPSHOT
+ 1.49.0
apm-httpclient-core
diff --git a/apm-agent-plugins/apm-httpserver-core/pom.xml b/apm-agent-plugins/apm-httpserver-core/pom.xml
index 702736ed6e..d82a19e192 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.48.2-SNAPSHOT
+ 1.49.0
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 6630f0da94..c60a31e44d 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.48.2-SNAPSHOT
+ 1.49.0
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 aec7d4d61e..c87a92c14d 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.48.2-SNAPSHOT
+ 1.49.0
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 d69b13e8d4..2263c5dd1d 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.48.2-SNAPSHOT
+ 1.49.0
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 c8e4775859..a36e51557d 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.48.2-SNAPSHOT
+ 1.49.0
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 26255efff9..2b1abf4e04 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-jaxrs-plugin/pom.xml b/apm-agent-plugins/apm-jaxrs-plugin/pom.xml
index 15eaeb76c2..45a0e56639 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.48.2-SNAPSHOT
+ 1.49.0
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 1466284ce5..40d4a93f9a 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-jaxws-plugin/pom.xml b/apm-agent-plugins/apm-jaxws-plugin/pom.xml
index b16e3a2782..90a111b56c 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.48.2-SNAPSHOT
+ 1.49.0
apm-jaxws-plugin
diff --git a/apm-agent-plugins/apm-jdbc-plugin/pom.xml b/apm-agent-plugins/apm-jdbc-plugin/pom.xml
index 8d279585e3..74f20b02a8 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.48.2-SNAPSHOT
+ 1.49.0
apm-jdbc-plugin
diff --git a/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml
index a7f6523fd7..6eb3481ba2 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.48.2-SNAPSHOT
+ 1.49.0
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 85c2823725..9ec611014a 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.48.2-SNAPSHOT
+ 1.49.0
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 bbbcc1a0f0..6d365048b9 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.48.2-SNAPSHOT
+ 1.49.0
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 9c10e3f17c..27471119bc 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.48.2-SNAPSHOT
+ 1.49.0
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 b85ed7a13e..33afe2abb0 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.48.2-SNAPSHOT
+ 1.49.0
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 81e1cfde8f..39c4afcaf3 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.48.2-SNAPSHOT
+ 1.49.0
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 c3c3b9d1b4..dc184d7c8f 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.48.2-SNAPSHOT
+ 1.49.0
apm-jms-plugin
diff --git a/apm-agent-plugins/apm-jmx-plugin/pom.xml b/apm-agent-plugins/apm-jmx-plugin/pom.xml
index 8dddd765b6..b086bf9ba4 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.48.2-SNAPSHOT
+ 1.49.0
apm-jmx-plugin
diff --git a/apm-agent-plugins/apm-jsf-plugin/pom.xml b/apm-agent-plugins/apm-jsf-plugin/pom.xml
index 8556914066..d2940944e1 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.48.2-SNAPSHOT
+ 1.49.0
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 f3b6911e9d..b250536ff2 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.48.2-SNAPSHOT
+ 1.49.0
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 4137353472..ad0b8527b0 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.48.2-SNAPSHOT
+ 1.49.0
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 bfbaf17272..5dc62cbc7d 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-kafka-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/pom.xml
index 85676c0666..dc6c403130 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.48.2-SNAPSHOT
+ 1.49.0
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 c1e66a3766..c634b39c11 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.48.2-SNAPSHOT
+ 1.49.0
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 a27c6ea565..ee67d929c8 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.48.2-SNAPSHOT
+ 1.49.0
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 afa55c335e..ab55c53b33 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.48.2-SNAPSHOT
+ 1.49.0
apm-log4j1-plugin
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 b5f08e2b67..b53fc81013 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.48.2-SNAPSHOT
+ 1.49.0
apm-log4j2-plugin
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 5d31a5212d..2bc3528efe 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.48.2-SNAPSHOT
+ 1.49.0
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 3fe9c12bee..71f1701839 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.48.2-SNAPSHOT
+ 1.49.0
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 0c4618b9d9..e25365e8e8 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.48.2-SNAPSHOT
+ 1.49.0
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 f3fed7db39..5eaeaa5d2f 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.48.2-SNAPSHOT
+ 1.49.0
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 fe9d2ea927..1da12350ba 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.48.2-SNAPSHOT
+ 1.49.0
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 1f901bfd46..624b9e9829 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.48.2-SNAPSHOT
+ 1.49.0
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 210a547700..a64baaddbc 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.48.2-SNAPSHOT
+ 1.49.0
apm-logging-plugin
diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
index 13b891a786..1a5fbb68c0 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
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 2ed07d0c3c..bc303c0d7b 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.48.2-SNAPSHOT
+ 1.49.0
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 2cd12d88fa..6e257d53a4 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.48.2-SNAPSHOT
+ 1.49.0
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 f79e060b0e..7dfdd18eda 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.48.2-SNAPSHOT
+ 1.49.0
apm-mongodb4-plugin
diff --git a/apm-agent-plugins/apm-mongodb/pom.xml b/apm-agent-plugins/apm-mongodb/pom.xml
index 94f6457acb..6db3400406 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.48.2-SNAPSHOT
+ 1.49.0
apm-mongodb
diff --git a/apm-agent-plugins/apm-okhttp-plugin/pom.xml b/apm-agent-plugins/apm-okhttp-plugin/pom.xml
index 17a140044a..30822c0400 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.48.2-SNAPSHOT
+ 1.49.0
apm-okhttp-plugin
diff --git a/apm-agent-plugins/apm-okhttp-test/pom.xml b/apm-agent-plugins/apm-okhttp-test/pom.xml
index 370ce9b874..2a541552a3 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.48.2-SNAPSHOT
+ 1.49.0
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 65610a16a8..7800ac6b1c 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.48.2-SNAPSHOT
+ 1.49.0
apm-opentelemetry-embedded-metrics-sdk
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 5f039cf1f6..d28deb47dd 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.48.2-SNAPSHOT
+ 1.49.0
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 1dd43e348e..3e536371c6 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.48.2-SNAPSHOT
+ 1.49.0
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 b2464b6b7d..4c8eb9ee99 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.48.2-SNAPSHOT
+ 1.49.0
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 4c63b96869..33500a984c 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.48.2-SNAPSHOT
+ 1.49.0
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 8427d641bf..4aa623a588 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.48.2-SNAPSHOT
+ 1.49.0
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 9caf40a9e7..8a26722207 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.48.2-SNAPSHOT
+ 1.49.0
apm-opentelemetry-plugin
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 0e426ab323..03b4573f92 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.48.2-SNAPSHOT
+ 1.49.0
${project.groupId}:${project.artifactId}
diff --git a/apm-agent-plugins/apm-opentelemetry/pom.xml b/apm-agent-plugins/apm-opentelemetry/pom.xml
index a309696fcd..9171c625c5 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.48.2-SNAPSHOT
+ 1.49.0
apm-opentelemetry
diff --git a/apm-agent-plugins/apm-opentracing-plugin/pom.xml b/apm-agent-plugins/apm-opentracing-plugin/pom.xml
index ae9e4bf4b0..be27c04d20 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.48.2-SNAPSHOT
+ 1.49.0
apm-opentracing-plugin
diff --git a/apm-agent-plugins/apm-process-plugin/pom.xml b/apm-agent-plugins/apm-process-plugin/pom.xml
index da684669d9..533ed6b78c 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-profiling-plugin/pom.xml b/apm-agent-plugins/apm-profiling-plugin/pom.xml
index 8f5e912af0..7c54ea6958 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.48.2-SNAPSHOT
+ 1.49.0
apm-profiling-plugin
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 c4012b542e..5edcec6136 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.48.2-SNAPSHOT
+ 1.49.0
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 019654416e..2d5a1baf8b 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.48.2-SNAPSHOT
+ 1.49.0
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 1b2d22a3cc..f971adf098 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-quartz/pom.xml b/apm-agent-plugins/apm-quartz/pom.xml
index 5bd74fe5b8..9c26ec94ad 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.48.2-SNAPSHOT
+ 1.49.0
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 232a8a3c91..ea32ca0f82 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.48.2-SNAPSHOT
+ 1.49.0
apm-rabbitmq-plugin
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
index d5d6476ea6..be3e19e6a1 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
@@ -5,7 +5,7 @@
apm-rabbitmq
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-rabbitmq-spring
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 964023983e..83a7c279cc 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.48.2-SNAPSHOT
+ 1.49.0
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 c0f6d5606f..a87c19884d 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.48.2-SNAPSHOT
+ 1.49.0
apm-rabbitmq-test-4
diff --git a/apm-agent-plugins/apm-rabbitmq/pom.xml b/apm-agent-plugins/apm-rabbitmq/pom.xml
index 84c3adf675..e0a2323da9 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.48.2-SNAPSHOT
+ 1.49.0
apm-rabbitmq
diff --git a/apm-agent-plugins/apm-reactor-plugin/pom.xml b/apm-agent-plugins/apm-reactor-plugin/pom.xml
index 7c33618024..9e538c6043 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.48.2-SNAPSHOT
+ 1.49.0
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 b851eba9bd..1d7bec2069 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.48.2-SNAPSHOT
+ 1.49.0
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 dffe6419d6..a0fe35c569 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.48.2-SNAPSHOT
+ 1.49.0
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 e67e74953d..9c6fcc4a4d 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.48.2-SNAPSHOT
+ 1.49.0
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 8a36ca3d0b..d944984596 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.48.2-SNAPSHOT
+ 1.49.0
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 3f1760fbec..f584237c3e 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.48.2-SNAPSHOT
+ 1.49.0
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 27859df68e..d95aae9259 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.48.2-SNAPSHOT
+ 1.49.0
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 ce9a3f8dcf..514ffe48f8 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.48.2-SNAPSHOT
+ 1.49.0
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 47e44ad13e..1007e8613c 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.48.2-SNAPSHOT
+ 1.49.0
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 f55fed32df..c87bcfcfa0 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.48.2-SNAPSHOT
+ 1.49.0
apm-redisson-plugin
diff --git a/apm-agent-plugins/apm-redis-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/pom.xml
index bcc0712a47..560691c71c 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.48.2-SNAPSHOT
+ 1.49.0
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 6cf99a7db4..943daf423d 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.48.2-SNAPSHOT
+ 1.49.0
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 c49411054e..ecea4dfa34 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.48.2-SNAPSHOT
+ 1.49.0
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 6e4018e604..cf39551c41 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.48.2-SNAPSHOT
+ 1.49.0
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 156602f6d0..be040cba19 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.48.2-SNAPSHOT
+ 1.49.0
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 53be86608e..c8dd43f4de 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.48.2-SNAPSHOT
+ 1.49.0
apm-servlet-plugin
diff --git a/apm-agent-plugins/apm-sparkjava-plugin/pom.xml b/apm-agent-plugins/apm-sparkjava-plugin/pom.xml
index e5d4e3a010..e435044523 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.48.2-SNAPSHOT
+ 1.49.0
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 3f02160f34..b529ca9fea 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-restclient-test
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 8d9a70f69f..2f6c4456ea 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-resttemplate-plugin
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 deae551502..82d497b2eb 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.48.2-SNAPSHOT
+ 1.49.0
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 94f3434b62..f1d1463f07 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.48.2-SNAPSHOT
+ 1.49.0
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 446ebd3c83..19d61ff288 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-webclient-plugin
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 7fd7fca12d..79e5c0b0b3 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.48.2-SNAPSHOT
+ 1.49.0
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 b781076a72..a0bf5cbbf9 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.48.2-SNAPSHOT
+ 1.49.0
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 85531d1a2f..0e43d1d7ea 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.48.2-SNAPSHOT
+ 1.49.0
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 30f4c298d7..ee213cf370 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-webflux-spring5
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 3e45fefa40..a4f28af941 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-webflux-testapp
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index 51265fae3c..ca0f7359cf 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-webflux
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 f42d4482df..3dfa508043 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.48.2-SNAPSHOT
+ 1.49.0
apm-spring-webmvc-plugin
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 21a82e7866..de6ea95ec3 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.48.2-SNAPSHOT
+ 1.49.0
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 e3c4af3f60..af3b7fa514 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-struts-plugin/pom.xml b/apm-agent-plugins/apm-struts-plugin/pom.xml
index f2f1116ef2..1e47f97dd8 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/apm-agent-plugins/apm-urlconnection-plugin/pom.xml b/apm-agent-plugins/apm-urlconnection-plugin/pom.xml
index b6ef4740c4..fdacc1e9b5 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.48.2-SNAPSHOT
+ 1.49.0
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 2f7905c136..4db2506f70 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.48.2-SNAPSHOT
+ 1.49.0
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 f449482dea..1c4e03391d 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.48.2-SNAPSHOT
+ 1.49.0
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 6e07055cf6..60a2ebca8b 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.48.2-SNAPSHOT
+ 1.49.0
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 be4b5e74d7..c47ffc1e4e 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.48.2-SNAPSHOT
+ 1.49.0
apm-vertx4-plugin
diff --git a/apm-agent-plugins/apm-vertx/pom.xml b/apm-agent-plugins/apm-vertx/pom.xml
index 46fb2455c2..1e935c6347 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.48.2-SNAPSHOT
+ 1.49.0
apm-vertx
diff --git a/apm-agent-plugins/pom.xml b/apm-agent-plugins/pom.xml
index bb2071af86..6acbfe7d40 100644
--- a/apm-agent-plugins/pom.xml
+++ b/apm-agent-plugins/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-plugins
diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml
index 096102758d..cf71cc4e53 100644
--- a/apm-agent-tracer/pom.xml
+++ b/apm-agent-tracer/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-agent-tracer
diff --git a/apm-opentracing/pom.xml b/apm-opentracing/pom.xml
index 36d44a138e..1e34b37172 100644
--- a/apm-opentracing/pom.xml
+++ b/apm-opentracing/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
apm-opentracing
diff --git a/elastic-apm-agent-java8/pom.xml b/elastic-apm-agent-java8/pom.xml
index e0d262749a..ce3d63b288 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.48.2-SNAPSHOT
+ 1.49.0
elastic-apm-agent-java8
diff --git a/elastic-apm-agent-premain/pom.xml b/elastic-apm-agent-premain/pom.xml
index 9d87be02e9..94ad89199b 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/elastic-apm-agent/pom.xml b/elastic-apm-agent/pom.xml
index 76f7c4c2f2..a7fb3005e7 100644
--- a/elastic-apm-agent/pom.xml
+++ b/elastic-apm-agent/pom.xml
@@ -5,7 +5,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.2-SNAPSHOT
+ 1.49.0
elastic-apm-agent
diff --git a/integration-tests/application-server-integration-tests/pom.xml b/integration-tests/application-server-integration-tests/pom.xml
index 78f55c218a..ff82f3c7f7 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.48.2-SNAPSHOT
+ 1.49.0
application-server-integration-tests
diff --git a/integration-tests/aws-lambda-test/pom.xml b/integration-tests/aws-lambda-test/pom.xml
index 043164b62e..8d4ccb5cb1 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.48.2-SNAPSHOT
+ 1.49.0
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 645386cf40..7fa8622b49 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.48.2-SNAPSHOT
+ 1.49.0
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 77baba8340..6976c519c7 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/integration-tests/cdi-app/pom.xml b/integration-tests/cdi-app/pom.xml
index aec2fbfdab..751dcc6c8f 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.48.2-SNAPSHOT
+ 1.49.0
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 de3110de16..90de8b028e 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.48.2-SNAPSHOT
+ 1.49.0
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 28d9f094cc..ce3b1d89b4 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/integration-tests/cdi-jakartaee-app/pom.xml b/integration-tests/cdi-jakartaee-app/pom.xml
index f0dfb87676..e2a1eb57c2 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.48.2-SNAPSHOT
+ 1.49.0
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 d4148f8389..fbc6852359 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.48.2-SNAPSHOT
+ 1.49.0
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 51304363e2..b544aef5c2 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.48.2-SNAPSHOT
+ 1.49.0
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 2327dd561c..9d08c966f9 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.48.2-SNAPSHOT
+ 1.49.0
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 8c8101f4bf..4bd83805c8 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.48.2-SNAPSHOT
+ 1.49.0
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 2eaf4b7011..5cc0210bf5 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.48.2-SNAPSHOT
+ 1.49.0
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 32e9230a95..3a3c626b5b 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.48.2-SNAPSHOT
+ 1.49.0
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 842800861e..635ec073d8 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.48.2-SNAPSHOT
+ 1.49.0
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 37a8fe6849..1e008f01e2 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.48.2-SNAPSHOT
+ 1.49.0
plugin-instrumentation-target
diff --git a/integration-tests/external-plugin-test/pom.xml b/integration-tests/external-plugin-test/pom.xml
index 6e897b3663..1ab2a4717e 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.48.2-SNAPSHOT
+ 1.49.0
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 4a69451d2a..5e450c96fe 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.48.2-SNAPSHOT
+ 1.49.0
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 8a390f932c..4ad7029e6d 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/integration-tests/jakartaee-jsf-app/pom.xml b/integration-tests/jakartaee-jsf-app/pom.xml
index 0b0938d089..32fa2c1fa8 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
pom
diff --git a/integration-tests/jakartaee-simple-webapp/pom.xml b/integration-tests/jakartaee-simple-webapp/pom.xml
index 73d8836596..3a265054c1 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.48.2-SNAPSHOT
+ 1.49.0
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 0e97912243..4632305024 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.48.2-SNAPSHOT
+ 1.49.0
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 5992155203..cb554b6882 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.48.2-SNAPSHOT
+ 1.49.0
jsf-app-standalone
diff --git a/integration-tests/jsf-app/pom.xml b/integration-tests/jsf-app/pom.xml
index e2fc080321..4a77fc6fc8 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.48.2-SNAPSHOT
+ 1.49.0
jsf-app
diff --git a/integration-tests/main-app-test/pom.xml b/integration-tests/main-app-test/pom.xml
index 7aba42e2a1..2394a2d859 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.48.2-SNAPSHOT
+ 1.49.0
main-app-test
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index c6800d5577..9e925c082c 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
integration-tests
diff --git a/integration-tests/quarkus/pom.xml b/integration-tests/quarkus/pom.xml
index 5d099e3f07..71b503b0f3 100644
--- a/integration-tests/quarkus/pom.xml
+++ b/integration-tests/quarkus/pom.xml
@@ -5,7 +5,7 @@
integration-tests
co.elastic.apm
- 1.48.2-SNAPSHOT
+ 1.49.0
quarkus
diff --git a/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml
index 19d6d81b24..fb55d2f3a0 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.48.2-SNAPSHOT
+ 1.49.0
quarkus-jaxrs-base
diff --git a/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml
index 1075b45659..ba4c3c4e5a 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.48.2-SNAPSHOT
+ 1.49.0
quarkus-jaxrs-undertow
diff --git a/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml
index fdb198f7ea..ef2d751b8b 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.48.2-SNAPSHOT
+ 1.49.0
quarkus-jaxrs-vertx
diff --git a/integration-tests/runtime-attach/pom.xml b/integration-tests/runtime-attach/pom.xml
index c6d07b45eb..3cd9da7adf 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.48.2-SNAPSHOT
+ 1.49.0
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 67442e2407..69de69af65 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.48.2-SNAPSHOT
+ 1.49.0
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 4ab75d5835..604a113b35 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/integration-tests/simple-webapp/pom.xml b/integration-tests/simple-webapp/pom.xml
index b08f6fec40..35b1604594 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.48.2-SNAPSHOT
+ 1.49.0
simple-webapp
diff --git a/integration-tests/soap-test/pom.xml b/integration-tests/soap-test/pom.xml
index 1ebad4536e..0d03952129 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.48.2-SNAPSHOT
+ 1.49.0
soap-test
diff --git a/integration-tests/spring-boot-1-5/pom.xml b/integration-tests/spring-boot-1-5/pom.xml
index a27b24fd16..82ffa2180c 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.48.2-SNAPSHOT
+ 1.49.0
spring-boot-1-5
diff --git a/integration-tests/spring-boot-2/pom.xml b/integration-tests/spring-boot-2/pom.xml
index 6e834687b2..8f1aaa1d15 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.48.2-SNAPSHOT
+ 1.49.0
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 528160db9b..ff01bc47fb 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.48.2-SNAPSHOT
+ 1.49.0
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 9f07748eef..879735c5a5 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.48.2-SNAPSHOT
+ 1.49.0
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 4eacadb320..229fc95d95 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.48.2-SNAPSHOT
+ 1.49.0
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 3c7212ec18..85ceea0865 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.48.2-SNAPSHOT
+ 1.49.0
spring-boot-2-undertow
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index 174007e9fe..744200d853 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.48.2-SNAPSHOT
+ 1.49.0
spring-boot-3
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 4d63b45954..b7ba4b02bf 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.48.2-SNAPSHOT
+ 1.49.0
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 75cf0f4adc..bc0b652eb9 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.48.2-SNAPSHOT
+ 1.49.0
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 1633a3aeb5..d1818a48c5 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.48.2-SNAPSHOT
+ 1.49.0
4.0.0
diff --git a/pom.xml b/pom.xml
index dccc732203..262422be2c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.48.2-SNAPSHOT
+ 1.49.0
pom
${project.groupId}:${project.artifactId}
From 3059907525593a5470738503131cf0d72aaa14ae Mon Sep 17 00:00:00 2001
From: Adrien Mannocci
Date: Tue, 2 Apr 2024 14:58:03 +0200
Subject: [PATCH 021/132] ci(fix): use input value instead of env value for
post release trigger (#3577)
Signed-off-by: Adrien Mannocci
---
.github/workflows/release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dc9a754f3e..53c3ed5f58 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -248,7 +248,7 @@ jobs:
if: inputs.dry_run == false
with:
ref: ${{ inputs.ref }}
- version: ${{ env.RELEASE_VERSION }}
+ version: ${{ inputs.version }}
phase: 'post'
secrets: inherit
From 1a17acb2e123d67da36594ef5da8bcde7a3116a7 Mon Sep 17 00:00:00 2001
From: Adrien Mannocci
Date: Tue, 2 Apr 2024 15:56:11 +0200
Subject: [PATCH 022/132] ci(fix): correct buildkite pipeline trigger (#3578)
Signed-off-by: Adrien Mannocci
---
.github/workflows/release.yml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 53c3ed5f58..d7b05b048f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -84,7 +84,6 @@ jobs:
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-java-release
- pipelineCommit: ${{ env.RELEASE_VERSION }}
waitFor: true
printBuildLogs: false
buildEnvVars: |
@@ -204,9 +203,24 @@ jobs:
cat .ci/.arn-file.md >> $GITHUB_OUTPUT
echo 'ARN_CONTENT_EOF' >> $GITHUB_OUTPUT
+ post-release:
+ name: "Bump versions and create PR"
+ needs:
+ - await-maven-central-artifact
+ uses: ./.github/workflows/pre-post-release.yml
+ permissions:
+ contents: write
+ if: inputs.dry_run == false
+ with:
+ ref: ${{ inputs.ref }}
+ version: ${{ inputs.version }}
+ phase: 'post'
+ secrets: inherit
+
create-github-release:
name: "Create GitHub Release"
needs:
+ - post-release
- publish-aws-lambda
- update-major-branch
runs-on: ubuntu-latest
@@ -238,20 +252,6 @@ jobs:
--notes="[Release Notes for ${{ env.RELEASE_VERSION }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ env.RELEASE_VERSION }})
${{ needs.publish-aws-lambda.outputs.arn_content }}"
- post-release:
- name: "Bump versions and create PR"
- needs:
- - await-maven-central-artifact
- uses: ./.github/workflows/pre-post-release.yml
- permissions:
- contents: write
- if: inputs.dry_run == false
- with:
- ref: ${{ inputs.ref }}
- version: ${{ inputs.version }}
- phase: 'post'
- secrets: inherit
-
notify:
if: ${{ always() && ! inputs.dry_run }}
needs:
From 42f00955d23b6d7a940343a845cb4a9344c59c8e Mon Sep 17 00:00:00 2001
From: apmmachine <58790750+apmmachine@users.noreply.github.com>
Date: Thu, 4 Apr 2024 03:45:35 -0400
Subject: [PATCH 023/132] post release: elastic-apm-agent v1.49.0 (#3579)
Co-authored-by: apmmachine
---
apm-agent-api/pom.xml | 2 +-
apm-agent-attach-cli/pom.xml | 2 +-
apm-agent-attach/pom.xml | 2 +-
apm-agent-benchmarks/pom.xml | 2 +-
apm-agent-bootstrap/pom.xml | 2 +-
apm-agent-builds/apm-agent-java8/pom.xml | 2 +-
apm-agent-builds/apm-agent/pom.xml | 2 +-
apm-agent-builds/pom.xml | 2 +-
apm-agent-cached-lookup-key/pom.xml | 2 +-
apm-agent-common/pom.xml | 2 +-
apm-agent-core/pom.xml | 2 +-
apm-agent-lambda-layer/pom.xml | 2 +-
apm-agent-plugin-sdk/pom.xml | 2 +-
.../apm-apache-httpclient/apm-apache-httpclient-common/pom.xml | 2 +-
.../apm-apache-httpclient/apm-apache-httpclient3-plugin/pom.xml | 2 +-
.../apm-apache-httpclient/apm-apache-httpclient4-plugin/pom.xml | 2 +-
.../apm-apache-httpclient/apm-apache-httpclient5-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-apache-httpclient/pom.xml | 2 +-
apm-agent-plugins/apm-api-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-1-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-common/pom.xml | 2 +-
apm-agent-plugins/apm-aws-sdk/pom.xml | 2 +-
apm-agent-plugins/apm-awslambda-plugin/pom.xml | 2 +-
.../apm-cassandra/apm-cassandra-core-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/apm-cassandra3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/apm-cassandra4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-cassandra/pom.xml | 2 +-
apm-agent-plugins/apm-dubbo-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-ecs-logging-plugin/pom.xml | 2 +-
.../apm-es-restclient-plugin-5_6/pom.xml | 2 +-
.../apm-es-restclient-plugin-6_4/pom.xml | 2 +-
.../apm-es-restclient-plugin-7_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-8_x/pom.xml | 2 +-
.../apm-es-restclient-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-es-restclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grails-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-1.6.1/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/apm-grpc-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-grpc/pom.xml | 2 +-
.../apm-hibernate-search-plugin-5_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-6_x/pom.xml | 2 +-
.../apm-hibernate-search-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-hibernate-search-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-httpclient-core/pom.xml | 2 +-
apm-agent-plugins/apm-httpserver-core/pom.xml | 2 +-
apm-agent-plugins/apm-jakarta-websocket-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-concurrent-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-java-ldap-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-javalin-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jaxrs-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxrs-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jaxws-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-jaxws-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdbc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jdk-httpserver-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-javax/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-plugin-base/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/apm-jms-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jms-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jmx-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-jsf-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-base-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-headers-plugin/pom.xml | 2 +-
.../apm-kafka-plugin/apm-kafka-spring-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-kafka-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-jboss-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-jul-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-log4j1-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-log4j2-plugin/pom.xml | 2 +-
.../apm-logback-plugin/apm-logback-plugin-impl/pom.xml | 2 +-
.../apm-logback-plugin/apm-logback-plugin-legacy-tests/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-logback-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-logging-plugin-common/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/apm-slf4j-plugin/pom.xml | 2 +-
.../apm-logging-plugin/apm-tomcat-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-logging-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-micrometer-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb-common/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/apm-mongodb4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-mongodb/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-okhttp-test/pom.xml | 2 +-
.../apm-opentelemetry-embedded-metrics-sdk/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-common/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-latest/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-v1_14/pom.xml | 2 +-
.../apm-opentelemetry-metrics-bridge-parent/pom.xml | 2 +-
.../apm-opentelemetry-metricsdk-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-plugin/pom.xml | 2 +-
.../apm-opentelemetry/apm-opentelemetry-test/pom.xml | 2 +-
apm-agent-plugins/apm-opentelemetry/pom.xml | 2 +-
apm-agent-plugins/apm-opentracing-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-process-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-profiling-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-common/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-1/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/apm-quartz-plugin-2/pom.xml | 2 +-
apm-agent-plugins/apm-quartz/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-3/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-test-4/pom.xml | 2 +-
apm-agent-plugins/apm-rabbitmq/pom.xml | 2 +-
apm-agent-plugins/apm-reactor-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-2-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-3-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-5-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-jedis-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-lettuce-3-tests/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-lettuce-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-redis-common/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-redis-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-scala-concurrent-plugin/pom.xml | 2 +-
.../apm-scheduled-annotation-plugin-jakartaee-test/pom.xml | 2 +-
apm-agent-plugins/apm-scheduled-annotation-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-jakarta-test/pom.xml | 2 +-
apm-agent-plugins/apm-servlet-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-sparkjava-plugin/pom.xml | 2 +-
.../apm-spring-resttemplate/apm-spring-restclient-test/pom.xml | 2 +-
.../apm-spring-resttemplate-plugin/pom.xml | 2 +-
.../apm-spring-resttemplate-test/pom.xml | 2 +-
apm-agent-plugins/apm-spring-resttemplate/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webclient-plugin/pom.xml | 2 +-
.../apm-spring-webflux-common-spring5/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-common/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-plugin/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-spring5/pom.xml | 2 +-
.../apm-spring-webflux/apm-spring-webflux-testapp/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-spring5/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webmvc/pom.xml | 2 +-
apm-agent-plugins/apm-struts-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-urlconnection-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx-common/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx3-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx3-test-latest/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/apm-vertx4-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-vertx/pom.xml | 2 +-
apm-agent-plugins/pom.xml | 2 +-
apm-agent-tracer/pom.xml | 2 +-
apm-opentracing/pom.xml | 2 +-
cloudfoundry/index.yml | 1 +
elastic-apm-agent-java8/pom.xml | 2 +-
elastic-apm-agent-premain/pom.xml | 2 +-
elastic-apm-agent/pom.xml | 2 +-
integration-tests/application-server-integration-tests/pom.xml | 2 +-
integration-tests/aws-lambda-test/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-dependent/pom.xml | 2 +-
integration-tests/cdi-app/cdi-app-standalone/pom.xml | 2 +-
integration-tests/cdi-app/pom.xml | 2 +-
.../cdi-jakartaee-app/cdi-jakartaee-app-dependent/pom.xml | 2 +-
.../cdi-jakartaee-app/cdi-jakartaee-app-standalone/pom.xml | 2 +-
integration-tests/cdi-jakartaee-app/pom.xml | 2 +-
.../external-plugin-otel-test-app/pom.xml | 2 +-
.../external-plugin-otel-test-plugin1/pom.xml | 2 +-
.../external-plugin-otel-test-plugin2/pom.xml | 2 +-
integration-tests/external-plugin-otel-test/pom.xml | 2 +-
.../external-plugin-test/external-plugin-app/pom.xml | 2 +-
.../external-plugin-test/external-plugin-jakarta-app/pom.xml | 2 +-
integration-tests/external-plugin-test/external-plugin/pom.xml | 2 +-
.../external-plugin-test/plugin-instrumentation-target/pom.xml | 2 +-
integration-tests/external-plugin-test/pom.xml | 2 +-
.../jakartaee-jsf-app/jakartaee-jsf-app-dependent/pom.xml | 2 +-
.../jakartaee-jsf-app/jakartaee-jsf-app-standalone/pom.xml | 2 +-
integration-tests/jakartaee-jsf-app/pom.xml | 2 +-
integration-tests/jakartaee-simple-webapp/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-dependent/pom.xml | 2 +-
integration-tests/jsf-app/jsf-app-standalone/pom.xml | 2 +-
integration-tests/jsf-app/pom.xml | 2 +-
integration-tests/main-app-test/pom.xml | 2 +-
integration-tests/pom.xml | 2 +-
integration-tests/quarkus/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-base/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml | 2 +-
integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml | 2 +-
integration-tests/runtime-attach/pom.xml | 2 +-
integration-tests/runtime-attach/runtime-attach-app/pom.xml | 2 +-
integration-tests/runtime-attach/runtime-attach-test/pom.xml | 2 +-
integration-tests/simple-webapp/pom.xml | 2 +-
integration-tests/soap-test/pom.xml | 2 +-
integration-tests/spring-boot-1-5/pom.xml | 2 +-
integration-tests/spring-boot-2/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-base/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-jetty/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-tomcat/pom.xml | 2 +-
integration-tests/spring-boot-2/spring-boot-2-undertow/pom.xml | 2 +-
integration-tests/spring-boot-3/pom.xml | 2 +-
integration-tests/spring-boot-3/spring-boot-3-jetty/pom.xml | 2 +-
integration-tests/spring-boot-3/spring-boot-3-tomcat/pom.xml | 2 +-
integration-tests/spring-boot-3/spring-boot-3-undertow/pom.xml | 2 +-
pom.xml | 2 +-
201 files changed, 201 insertions(+), 200 deletions(-)
diff --git a/apm-agent-api/pom.xml b/apm-agent-api/pom.xml
index 7c967db31a..f5f4b9e638 100644
--- a/apm-agent-api/pom.xml
+++ b/apm-agent-api/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-api
diff --git a/apm-agent-attach-cli/pom.xml b/apm-agent-attach-cli/pom.xml
index 461dbf4dc2..babd6a2e0c 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-attach/pom.xml b/apm-agent-attach/pom.xml
index 32da5d5c25..e8ebfe1006 100644
--- a/apm-agent-attach/pom.xml
+++ b/apm-agent-attach/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-attach
diff --git a/apm-agent-benchmarks/pom.xml b/apm-agent-benchmarks/pom.xml
index 142bf7c9fb..e77f4143f4 100644
--- a/apm-agent-benchmarks/pom.xml
+++ b/apm-agent-benchmarks/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-benchmarks
diff --git a/apm-agent-bootstrap/pom.xml b/apm-agent-bootstrap/pom.xml
index bc2d76aa63..d3be167b51 100644
--- a/apm-agent-bootstrap/pom.xml
+++ b/apm-agent-bootstrap/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-bootstrap
diff --git a/apm-agent-builds/apm-agent-java8/pom.xml b/apm-agent-builds/apm-agent-java8/pom.xml
index 47dccec352..48f8f81e31 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.49.0
+ 1.49.1-SNAPSHOT
apm-agent-java8
diff --git a/apm-agent-builds/apm-agent/pom.xml b/apm-agent-builds/apm-agent/pom.xml
index f04515c0a2..9635ce5fe4 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.49.0
+ 1.49.1-SNAPSHOT
apm-agent
diff --git a/apm-agent-builds/pom.xml b/apm-agent-builds/pom.xml
index bda0b824cd..89c316891b 100644
--- a/apm-agent-builds/pom.xml
+++ b/apm-agent-builds/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-cached-lookup-key/pom.xml b/apm-agent-cached-lookup-key/pom.xml
index 3f910cf4f6..43dfff7a6f 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-common/pom.xml b/apm-agent-common/pom.xml
index 6842b66afc..c565de54aa 100644
--- a/apm-agent-common/pom.xml
+++ b/apm-agent-common/pom.xml
@@ -3,7 +3,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index 61dec83244..cb04140691 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-core
diff --git a/apm-agent-lambda-layer/pom.xml b/apm-agent-lambda-layer/pom.xml
index 2632f74b45..ef64fb7bab 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugin-sdk/pom.xml b/apm-agent-plugin-sdk/pom.xml
index 88840de213..bc936ad029 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
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 70a1c86efa..803a5e56bc 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.49.0
+ 1.49.1-SNAPSHOT
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 e200ba4293..3707e78310 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.49.0
+ 1.49.1-SNAPSHOT
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 ad7f1b9375..e0481d54d5 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.49.0
+ 1.49.1-SNAPSHOT
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 53c1f0445d..1c877c20f2 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.49.0
+ 1.49.1-SNAPSHOT
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 db5fea7c42..826d04e836 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.49.0
+ 1.49.1-SNAPSHOT
apm-apache-httpclient
diff --git a/apm-agent-plugins/apm-api-plugin/pom.xml b/apm-agent-plugins/apm-api-plugin/pom.xml
index 2fa06b2262..4de7fd2ada 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.49.0
+ 1.49.1-SNAPSHOT
diff --git a/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml b/apm-agent-plugins/apm-asynchttpclient-plugin/pom.xml
index 963d44ac35..b370270ce5 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.49.0
+ 1.49.1-SNAPSHOT
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 2befe6bdad..6a45943f29 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.49.0
+ 1.49.1-SNAPSHOT
4.0.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 6297842308..e99b777283 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
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 a48a31ae96..3ae762d78c 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-aws-sdk/pom.xml b/apm-agent-plugins/apm-aws-sdk/pom.xml
index 6196ff5d40..58c23fe14c 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-awslambda-plugin/pom.xml b/apm-agent-plugins/apm-awslambda-plugin/pom.xml
index 405bb4a42b..d41c1a4165 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.49.0
+ 1.49.1-SNAPSHOT
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 be3fbb0565..f528f9982d 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.49.0
+ 1.49.1-SNAPSHOT
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 f8ad869438..2e6876a0df 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.49.0
+ 1.49.1-SNAPSHOT
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 1130b7ff35..ac263b097c 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-cassandra/pom.xml b/apm-agent-plugins/apm-cassandra/pom.xml
index a6fcd2e7a1..8925ab40bc 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-dubbo-plugin/pom.xml b/apm-agent-plugins/apm-dubbo-plugin/pom.xml
index bef2e71d9e..3e927e43c3 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.49.0
+ 1.49.1-SNAPSHOT
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 794c55ad97..30848b2551 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.49.0
+ 1.49.1-SNAPSHOT
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 e3145e447e..1caf24d158 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.49.0
+ 1.49.1-SNAPSHOT
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 d3ce291f35..1e35094b36 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.49.0
+ 1.49.1-SNAPSHOT
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 972d0f081f..96fca94447 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.49.0
+ 1.49.1-SNAPSHOT
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 cba4d9d614..9a4d751980 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.49.0
+ 1.49.1-SNAPSHOT
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 11191c15d0..57e1db6446 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.49.0
+ 1.49.1-SNAPSHOT
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 284c69814d..c7b9448211 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.49.0
+ 1.49.1-SNAPSHOT
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 c5282b5a39..93c15c6973 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.49.0
+ 1.49.1-SNAPSHOT
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 395750bc79..8cf9d81d42 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.49.0
+ 1.49.1-SNAPSHOT
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 cce2de5dc1..1c06a303ce 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.49.0
+ 1.49.1-SNAPSHOT
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 fc32f566a9..1a7d1adee7 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.49.0
+ 1.49.1-SNAPSHOT
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 216087d7a8..7ec9704929 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.49.0
+ 1.49.1-SNAPSHOT
apm-grpc-test-latest
diff --git a/apm-agent-plugins/apm-grpc/pom.xml b/apm-agent-plugins/apm-grpc/pom.xml
index 759c1f1320..650b9adbfb 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.49.0
+ 1.49.1-SNAPSHOT
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 8f48e364f7..a71b950a0f 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.49.0
+ 1.49.1-SNAPSHOT
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 ab99217b36..bcc06a18f1 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.49.0
+ 1.49.1-SNAPSHOT
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 e5ad36c01d..fedfd401ed 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.49.0
+ 1.49.1-SNAPSHOT
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 e87bec250b..8a8fc9ea33 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.49.0
+ 1.49.1-SNAPSHOT
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 6f0e154bc2..6ef9562f07 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.49.0
+ 1.49.1-SNAPSHOT
apm-httpclient-core
diff --git a/apm-agent-plugins/apm-httpserver-core/pom.xml b/apm-agent-plugins/apm-httpserver-core/pom.xml
index d82a19e192..4df8288597 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.49.0
+ 1.49.1-SNAPSHOT
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 c60a31e44d..f3904e3db8 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.49.0
+ 1.49.1-SNAPSHOT
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 c87a92c14d..8544918061 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.49.0
+ 1.49.1-SNAPSHOT
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 2263c5dd1d..523cc368a1 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.49.0
+ 1.49.1-SNAPSHOT
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 a36e51557d..3c4227f266 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.49.0
+ 1.49.1-SNAPSHOT
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 2b1abf4e04..d1092b01fa 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-jaxrs-plugin/pom.xml b/apm-agent-plugins/apm-jaxrs-plugin/pom.xml
index 45a0e56639..d6a8fa215d 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.49.0
+ 1.49.1-SNAPSHOT
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 40d4a93f9a..cf6b2a5fc9 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-jaxws-plugin/pom.xml b/apm-agent-plugins/apm-jaxws-plugin/pom.xml
index 90a111b56c..c613e21e7f 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.49.0
+ 1.49.1-SNAPSHOT
apm-jaxws-plugin
diff --git a/apm-agent-plugins/apm-jdbc-plugin/pom.xml b/apm-agent-plugins/apm-jdbc-plugin/pom.xml
index 74f20b02a8..f270f5eb77 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.49.0
+ 1.49.1-SNAPSHOT
apm-jdbc-plugin
diff --git a/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-jdk-httpclient-plugin/pom.xml
index 6eb3481ba2..f93c3339df 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.49.0
+ 1.49.1-SNAPSHOT
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 9ec611014a..8687088de4 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.49.0
+ 1.49.1-SNAPSHOT
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 6d365048b9..a27a3d859a 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.49.0
+ 1.49.1-SNAPSHOT
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 27471119bc..77c7d5424d 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.49.0
+ 1.49.1-SNAPSHOT
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 33afe2abb0..072746a039 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.49.0
+ 1.49.1-SNAPSHOT
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 39c4afcaf3..c677d039fc 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.49.0
+ 1.49.1-SNAPSHOT
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 dc184d7c8f..a4775009d0 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.49.0
+ 1.49.1-SNAPSHOT
apm-jms-plugin
diff --git a/apm-agent-plugins/apm-jmx-plugin/pom.xml b/apm-agent-plugins/apm-jmx-plugin/pom.xml
index b086bf9ba4..3bcb3ae3f9 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.49.0
+ 1.49.1-SNAPSHOT
apm-jmx-plugin
diff --git a/apm-agent-plugins/apm-jsf-plugin/pom.xml b/apm-agent-plugins/apm-jsf-plugin/pom.xml
index d2940944e1..014df23ca5 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.49.0
+ 1.49.1-SNAPSHOT
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 b250536ff2..8b46074132 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.49.0
+ 1.49.1-SNAPSHOT
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 ad0b8527b0..6d61b032c3 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.49.0
+ 1.49.1-SNAPSHOT
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 5dc62cbc7d..99d0fd2f72 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-kafka-plugin/pom.xml b/apm-agent-plugins/apm-kafka-plugin/pom.xml
index dc6c403130..71dd9965cb 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.49.0
+ 1.49.1-SNAPSHOT
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 c634b39c11..3ac708c5fe 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.49.0
+ 1.49.1-SNAPSHOT
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 ee67d929c8..c79444831c 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.49.0
+ 1.49.1-SNAPSHOT
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 ab55c53b33..7ae617c195 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.49.0
+ 1.49.1-SNAPSHOT
apm-log4j1-plugin
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 b53fc81013..8d4335de89 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.49.0
+ 1.49.1-SNAPSHOT
apm-log4j2-plugin
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 2bc3528efe..a89c9d786b 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.49.0
+ 1.49.1-SNAPSHOT
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 71f1701839..b49b073a27 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.49.0
+ 1.49.1-SNAPSHOT
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 e25365e8e8..93c43deaf0 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.49.0
+ 1.49.1-SNAPSHOT
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 5eaeaa5d2f..a23979a734 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.49.0
+ 1.49.1-SNAPSHOT
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 1da12350ba..cf98c40c19 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.49.0
+ 1.49.1-SNAPSHOT
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 624b9e9829..a42a08de86 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.49.0
+ 1.49.1-SNAPSHOT
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 a64baaddbc..b8df808228 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.49.0
+ 1.49.1-SNAPSHOT
apm-logging-plugin
diff --git a/apm-agent-plugins/apm-micrometer-plugin/pom.xml b/apm-agent-plugins/apm-micrometer-plugin/pom.xml
index 1a5fbb68c0..f5d9a2ee44 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
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 bc303c0d7b..755c6c6f1d 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.49.0
+ 1.49.1-SNAPSHOT
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 6e257d53a4..37e1bae97f 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.49.0
+ 1.49.1-SNAPSHOT
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 7dfdd18eda..b8ce4328ba 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.49.0
+ 1.49.1-SNAPSHOT
apm-mongodb4-plugin
diff --git a/apm-agent-plugins/apm-mongodb/pom.xml b/apm-agent-plugins/apm-mongodb/pom.xml
index 6db3400406..142126101a 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.49.0
+ 1.49.1-SNAPSHOT
apm-mongodb
diff --git a/apm-agent-plugins/apm-okhttp-plugin/pom.xml b/apm-agent-plugins/apm-okhttp-plugin/pom.xml
index 30822c0400..fcb72fcf64 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.49.0
+ 1.49.1-SNAPSHOT
apm-okhttp-plugin
diff --git a/apm-agent-plugins/apm-okhttp-test/pom.xml b/apm-agent-plugins/apm-okhttp-test/pom.xml
index 2a541552a3..1d286d53a4 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.49.0
+ 1.49.1-SNAPSHOT
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 7800ac6b1c..b7ebc9df39 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.49.0
+ 1.49.1-SNAPSHOT
apm-opentelemetry-embedded-metrics-sdk
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 d28deb47dd..e9fc243d55 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.49.0
+ 1.49.1-SNAPSHOT
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 3e536371c6..5532fee250 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.49.0
+ 1.49.1-SNAPSHOT
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 4c8eb9ee99..216797ede8 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.49.0
+ 1.49.1-SNAPSHOT
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 33500a984c..3558645018 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.49.0
+ 1.49.1-SNAPSHOT
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 4aa623a588..5ba5d5788a 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.49.0
+ 1.49.1-SNAPSHOT
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 8a26722207..b6a91fa966 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.49.0
+ 1.49.1-SNAPSHOT
apm-opentelemetry-plugin
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 03b4573f92..36fcf12be9 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.49.0
+ 1.49.1-SNAPSHOT
${project.groupId}:${project.artifactId}
diff --git a/apm-agent-plugins/apm-opentelemetry/pom.xml b/apm-agent-plugins/apm-opentelemetry/pom.xml
index 9171c625c5..05acd0120c 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.49.0
+ 1.49.1-SNAPSHOT
apm-opentelemetry
diff --git a/apm-agent-plugins/apm-opentracing-plugin/pom.xml b/apm-agent-plugins/apm-opentracing-plugin/pom.xml
index be27c04d20..6f2661406d 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.49.0
+ 1.49.1-SNAPSHOT
apm-opentracing-plugin
diff --git a/apm-agent-plugins/apm-process-plugin/pom.xml b/apm-agent-plugins/apm-process-plugin/pom.xml
index 533ed6b78c..8e80e63881 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-profiling-plugin/pom.xml b/apm-agent-plugins/apm-profiling-plugin/pom.xml
index 7c54ea6958..2a8f274337 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.49.0
+ 1.49.1-SNAPSHOT
apm-profiling-plugin
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 5edcec6136..e51fe14922 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.49.0
+ 1.49.1-SNAPSHOT
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 2d5a1baf8b..d51e86dc01 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.49.0
+ 1.49.1-SNAPSHOT
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 f971adf098..443ff0093f 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-quartz/pom.xml b/apm-agent-plugins/apm-quartz/pom.xml
index 9c26ec94ad..5a19d2b979 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.49.0
+ 1.49.1-SNAPSHOT
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 ea32ca0f82..50832c6820 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.49.0
+ 1.49.1-SNAPSHOT
apm-rabbitmq-plugin
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
index be3e19e6a1..2d0095ebd1 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-spring/pom.xml
@@ -5,7 +5,7 @@
apm-rabbitmq
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-rabbitmq-spring
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 83a7c279cc..5a04bf125b 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.49.0
+ 1.49.1-SNAPSHOT
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 a87c19884d..eb414ef030 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.49.0
+ 1.49.1-SNAPSHOT
apm-rabbitmq-test-4
diff --git a/apm-agent-plugins/apm-rabbitmq/pom.xml b/apm-agent-plugins/apm-rabbitmq/pom.xml
index e0a2323da9..a505050fff 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.49.0
+ 1.49.1-SNAPSHOT
apm-rabbitmq
diff --git a/apm-agent-plugins/apm-reactor-plugin/pom.xml b/apm-agent-plugins/apm-reactor-plugin/pom.xml
index 9e538c6043..a353270b5e 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.49.0
+ 1.49.1-SNAPSHOT
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 1d7bec2069..a331399344 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.49.0
+ 1.49.1-SNAPSHOT
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 a0fe35c569..5db12398d8 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.49.0
+ 1.49.1-SNAPSHOT
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 9c6fcc4a4d..0e78468bca 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.49.0
+ 1.49.1-SNAPSHOT
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 d944984596..1632f4329f 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.49.0
+ 1.49.1-SNAPSHOT
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 f584237c3e..aae0052a15 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.49.0
+ 1.49.1-SNAPSHOT
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 d95aae9259..f771afa423 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.49.0
+ 1.49.1-SNAPSHOT
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 514ffe48f8..80f219d91f 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.49.0
+ 1.49.1-SNAPSHOT
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 1007e8613c..75bd9ac1e0 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.49.0
+ 1.49.1-SNAPSHOT
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 c87bcfcfa0..18e1ca9f6b 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.49.0
+ 1.49.1-SNAPSHOT
apm-redisson-plugin
diff --git a/apm-agent-plugins/apm-redis-plugin/pom.xml b/apm-agent-plugins/apm-redis-plugin/pom.xml
index 560691c71c..2f2412367c 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.49.0
+ 1.49.1-SNAPSHOT
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 943daf423d..621876606a 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.49.0
+ 1.49.1-SNAPSHOT
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 ecea4dfa34..cf273a1fea 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.49.0
+ 1.49.1-SNAPSHOT
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 cf39551c41..347a1c028e 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.49.0
+ 1.49.1-SNAPSHOT
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 be040cba19..44a00b41dd 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.49.0
+ 1.49.1-SNAPSHOT
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 c8dd43f4de..75250d7353 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.49.0
+ 1.49.1-SNAPSHOT
apm-servlet-plugin
diff --git a/apm-agent-plugins/apm-sparkjava-plugin/pom.xml b/apm-agent-plugins/apm-sparkjava-plugin/pom.xml
index e435044523..c64cbde4d2 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.49.0
+ 1.49.1-SNAPSHOT
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 b529ca9fea..83f82ea463 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-restclient-test
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 2f6c4456ea..d9095045b8 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-resttemplate-plugin
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 82d497b2eb..cd3b7d712e 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.49.0
+ 1.49.1-SNAPSHOT
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 f1d1463f07..34e7759cf2 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.49.0
+ 1.49.1-SNAPSHOT
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 19d61ff288..000f152ace 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-webclient-plugin
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 79e5c0b0b3..404c8dfa7c 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.49.0
+ 1.49.1-SNAPSHOT
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 a0bf5cbbf9..ef1bdf97f2 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.49.0
+ 1.49.1-SNAPSHOT
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 0e43d1d7ea..d4e646522d 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.49.0
+ 1.49.1-SNAPSHOT
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 ee213cf370..762b5a3394 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-webflux-spring5
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 a4f28af941..1e266ace0c 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-webflux-testapp
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index ca0f7359cf..3e3a2bfbe9 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-webflux
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 3dfa508043..943d6aaac5 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.49.0
+ 1.49.1-SNAPSHOT
apm-spring-webmvc-plugin
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 de6ea95ec3..73fc6ac253 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.49.0
+ 1.49.1-SNAPSHOT
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 af3b7fa514..e105e7f028 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-struts-plugin/pom.xml b/apm-agent-plugins/apm-struts-plugin/pom.xml
index 1e47f97dd8..643ed49884 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/apm-agent-plugins/apm-urlconnection-plugin/pom.xml b/apm-agent-plugins/apm-urlconnection-plugin/pom.xml
index fdacc1e9b5..685da314f1 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.49.0
+ 1.49.1-SNAPSHOT
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 4db2506f70..38c5ab97f9 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.49.0
+ 1.49.1-SNAPSHOT
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 1c4e03391d..f1f5bc09a4 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.49.0
+ 1.49.1-SNAPSHOT
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 60a2ebca8b..a254019207 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.49.0
+ 1.49.1-SNAPSHOT
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 c47ffc1e4e..cecd3a7ad3 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.49.0
+ 1.49.1-SNAPSHOT
apm-vertx4-plugin
diff --git a/apm-agent-plugins/apm-vertx/pom.xml b/apm-agent-plugins/apm-vertx/pom.xml
index 1e935c6347..cf1306b6d9 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.49.0
+ 1.49.1-SNAPSHOT
apm-vertx
diff --git a/apm-agent-plugins/pom.xml b/apm-agent-plugins/pom.xml
index 6acbfe7d40..1185fc4596 100644
--- a/apm-agent-plugins/pom.xml
+++ b/apm-agent-plugins/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-plugins
diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml
index cf71cc4e53..92991e5858 100644
--- a/apm-agent-tracer/pom.xml
+++ b/apm-agent-tracer/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-agent-tracer
diff --git a/apm-opentracing/pom.xml b/apm-opentracing/pom.xml
index 1e34b37172..e44a285d82 100644
--- a/apm-opentracing/pom.xml
+++ b/apm-opentracing/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
apm-opentracing
diff --git a/cloudfoundry/index.yml b/cloudfoundry/index.yml
index 24b766a778..65ca4672fa 100644
--- a/cloudfoundry/index.yml
+++ b/cloudfoundry/index.yml
@@ -61,3 +61,4 @@
1.47.1: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.47.1/elastic-apm-agent-1.47.1.jar
1.48.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.48.0/elastic-apm-agent-1.48.0.jar
1.48.1: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.48.1/elastic-apm-agent-1.48.1.jar
+1.49.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.49.0/elastic-apm-agent-1.49.0.jar
diff --git a/elastic-apm-agent-java8/pom.xml b/elastic-apm-agent-java8/pom.xml
index ce3d63b288..8aa6a6a06d 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.49.0
+ 1.49.1-SNAPSHOT
elastic-apm-agent-java8
diff --git a/elastic-apm-agent-premain/pom.xml b/elastic-apm-agent-premain/pom.xml
index 94ad89199b..2bd0687a1a 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/elastic-apm-agent/pom.xml b/elastic-apm-agent/pom.xml
index a7fb3005e7..9a1dbb7d32 100644
--- a/elastic-apm-agent/pom.xml
+++ b/elastic-apm-agent/pom.xml
@@ -5,7 +5,7 @@
co.elastic.apm
apm-agent-parent
- 1.49.0
+ 1.49.1-SNAPSHOT
elastic-apm-agent
diff --git a/integration-tests/application-server-integration-tests/pom.xml b/integration-tests/application-server-integration-tests/pom.xml
index ff82f3c7f7..adc872e027 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.49.0
+ 1.49.1-SNAPSHOT
application-server-integration-tests
diff --git a/integration-tests/aws-lambda-test/pom.xml b/integration-tests/aws-lambda-test/pom.xml
index 8d4ccb5cb1..b146282afb 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.49.0
+ 1.49.1-SNAPSHOT
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 7fa8622b49..6f592ea349 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.49.0
+ 1.49.1-SNAPSHOT
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 6976c519c7..0379cbea6c 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/integration-tests/cdi-app/pom.xml b/integration-tests/cdi-app/pom.xml
index 751dcc6c8f..1c1cc53cdf 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.49.0
+ 1.49.1-SNAPSHOT
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 90de8b028e..96c8dde9d1 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.49.0
+ 1.49.1-SNAPSHOT
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 ce3b1d89b4..d0ae6556bd 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/integration-tests/cdi-jakartaee-app/pom.xml b/integration-tests/cdi-jakartaee-app/pom.xml
index e2a1eb57c2..8c004fd292 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.49.0
+ 1.49.1-SNAPSHOT
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 fbc6852359..efd5fa5cf7 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.49.0
+ 1.49.1-SNAPSHOT
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 b544aef5c2..7668aa0298 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.49.0
+ 1.49.1-SNAPSHOT
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 9d08c966f9..3463e6ed7e 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.49.0
+ 1.49.1-SNAPSHOT
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 4bd83805c8..51a54f93d4 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.49.0
+ 1.49.1-SNAPSHOT
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 5cc0210bf5..44d97f5878 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.49.0
+ 1.49.1-SNAPSHOT
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 3a3c626b5b..581f196ee3 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.49.0
+ 1.49.1-SNAPSHOT
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 635ec073d8..967d7d6d2f 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.49.0
+ 1.49.1-SNAPSHOT
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 1e008f01e2..0a6e456add 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.49.0
+ 1.49.1-SNAPSHOT
plugin-instrumentation-target
diff --git a/integration-tests/external-plugin-test/pom.xml b/integration-tests/external-plugin-test/pom.xml
index 1ab2a4717e..7f96cb6556 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.49.0
+ 1.49.1-SNAPSHOT
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 5e450c96fe..efa6889387 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.49.0
+ 1.49.1-SNAPSHOT
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 4ad7029e6d..2eaa88e63b 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/integration-tests/jakartaee-jsf-app/pom.xml b/integration-tests/jakartaee-jsf-app/pom.xml
index 32fa2c1fa8..7411855676 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
pom
diff --git a/integration-tests/jakartaee-simple-webapp/pom.xml b/integration-tests/jakartaee-simple-webapp/pom.xml
index 3a265054c1..0ab2d433e9 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.49.0
+ 1.49.1-SNAPSHOT
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 4632305024..50f8ed9d87 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.49.0
+ 1.49.1-SNAPSHOT
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 cb554b6882..104f8d90f1 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.49.0
+ 1.49.1-SNAPSHOT
jsf-app-standalone
diff --git a/integration-tests/jsf-app/pom.xml b/integration-tests/jsf-app/pom.xml
index 4a77fc6fc8..2ab9293e4a 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.49.0
+ 1.49.1-SNAPSHOT
jsf-app
diff --git a/integration-tests/main-app-test/pom.xml b/integration-tests/main-app-test/pom.xml
index 2394a2d859..625c246b46 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.49.0
+ 1.49.1-SNAPSHOT
main-app-test
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 9e925c082c..fde3f82b66 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -5,7 +5,7 @@
apm-agent-parent
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
integration-tests
diff --git a/integration-tests/quarkus/pom.xml b/integration-tests/quarkus/pom.xml
index 71b503b0f3..8dc727bdf2 100644
--- a/integration-tests/quarkus/pom.xml
+++ b/integration-tests/quarkus/pom.xml
@@ -5,7 +5,7 @@
integration-tests
co.elastic.apm
- 1.49.0
+ 1.49.1-SNAPSHOT
quarkus
diff --git a/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-base/pom.xml
index fb55d2f3a0..a144a2f254 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.49.0
+ 1.49.1-SNAPSHOT
quarkus-jaxrs-base
diff --git a/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-undertow/pom.xml
index ba4c3c4e5a..dd860ee5e3 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.49.0
+ 1.49.1-SNAPSHOT
quarkus-jaxrs-undertow
diff --git a/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml b/integration-tests/quarkus/quarkus-jaxrs-vertx/pom.xml
index ef2d751b8b..a64839752e 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.49.0
+ 1.49.1-SNAPSHOT
quarkus-jaxrs-vertx
diff --git a/integration-tests/runtime-attach/pom.xml b/integration-tests/runtime-attach/pom.xml
index 3cd9da7adf..19d7a14584 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.49.0
+ 1.49.1-SNAPSHOT
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 69de69af65..56404d91e5 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.49.0
+ 1.49.1-SNAPSHOT
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 604a113b35..1182bbca07 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/integration-tests/simple-webapp/pom.xml b/integration-tests/simple-webapp/pom.xml
index 35b1604594..68693deec3 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.49.0
+ 1.49.1-SNAPSHOT
simple-webapp
diff --git a/integration-tests/soap-test/pom.xml b/integration-tests/soap-test/pom.xml
index 0d03952129..55dec73cc1 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.49.0
+ 1.49.1-SNAPSHOT
soap-test
diff --git a/integration-tests/spring-boot-1-5/pom.xml b/integration-tests/spring-boot-1-5/pom.xml
index 82ffa2180c..92df8a5457 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.49.0
+ 1.49.1-SNAPSHOT
spring-boot-1-5
diff --git a/integration-tests/spring-boot-2/pom.xml b/integration-tests/spring-boot-2/pom.xml
index 8f1aaa1d15..48fae7c785 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.49.0
+ 1.49.1-SNAPSHOT
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 ff01bc47fb..d81e7e16cb 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.49.0
+ 1.49.1-SNAPSHOT
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 879735c5a5..507c04fdca 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.49.0
+ 1.49.1-SNAPSHOT
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 229fc95d95..f3654ee496 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.49.0
+ 1.49.1-SNAPSHOT
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 85ceea0865..06bb0f650c 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.49.0
+ 1.49.1-SNAPSHOT
spring-boot-2-undertow
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index 744200d853..0ef88d8a29 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.49.0
+ 1.49.1-SNAPSHOT
spring-boot-3
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 b7ba4b02bf..cc1fb3c562 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.49.0
+ 1.49.1-SNAPSHOT
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 bc0b652eb9..bc60dddfa1 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.49.0
+ 1.49.1-SNAPSHOT
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 d1818a48c5..efa75d999b 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.49.0
+ 1.49.1-SNAPSHOT
4.0.0
diff --git a/pom.xml b/pom.xml
index 262422be2c..13899352cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
co.elastic.apm
apm-agent-parent
- 1.49.0
+ 1.49.1-SNAPSHOT
pom
${project.groupId}:${project.artifactId}
From 1cdc171b409f5bc84981fa9a261a07c1bcfbbb32 Mon Sep 17 00:00:00 2001
From: Adrien Mannocci
Date: Thu, 4 Apr 2024 07:48:14 +0000
Subject: [PATCH 024/132] ci(fix): correct release order (#3581)
Signed-off-by: Adrien Mannocci
---
.github/workflows/release.yml | 53 +++++++++++++++++------------------
1 file changed, 26 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d7b05b048f..bc9b9d16e6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -101,32 +101,6 @@ jobs:
artifactid: 'elastic-apm-agent'
version: ${{ env.RELEASE_VERSION }}
- update-major-branch:
- name: "Update Major Branch"
- runs-on: ubuntu-latest
- needs:
- - await-maven-central-artifact
- permissions:
- contents: write
- steps:
- - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
- with:
- username: ${{ env.GIT_USER }}
- email: ${{ env.GIT_EMAIL }}
- token: ${{ env.GITHUB_TOKEN }}
- - uses: actions/checkout@v4
- with:
- ref: ${{ inputs.ref }}
- token: ${{ env.GITHUB_TOKEN }}
- - name: Update major branch
- if: ${{ ! inputs.dry_run }}
- run: .ci/release/update-major-branch.sh ${{ env.RELEASE_VERSION }}
-
build-and-push-docker-images:
name: "Build and push docker images"
runs-on: ubuntu-latest
@@ -217,10 +191,35 @@ jobs:
phase: 'post'
secrets: inherit
+ update-major-branch:
+ name: "Update Major Branch"
+ runs-on: ubuntu-latest
+ needs:
+ - post-release
+ permissions:
+ contents: write
+ steps:
+ - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
+ with:
+ url: ${{ secrets.VAULT_ADDR }}
+ roleId: ${{ secrets.VAULT_ROLE_ID }}
+ secretId: ${{ secrets.VAULT_SECRET_ID }}
+ - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
+ with:
+ username: ${{ env.GIT_USER }}
+ email: ${{ env.GIT_EMAIL }}
+ token: ${{ env.GITHUB_TOKEN }}
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.ref }}
+ token: ${{ env.GITHUB_TOKEN }}
+ - name: Update major branch
+ if: ${{ ! inputs.dry_run }}
+ run: .ci/release/update-major-branch.sh ${{ env.RELEASE_VERSION }}
+
create-github-release:
name: "Create GitHub Release"
needs:
- - post-release
- publish-aws-lambda
- update-major-branch
runs-on: ubuntu-latest
From e010c351a84f3784ac77d779e741fd1dcdbcc7af Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Apr 2024 08:02:30 +0200
Subject: [PATCH 025/132] Bump
org.springframework.boot:spring-boot-dependencies from 2.7.16 to 3.2.4
(#3572)
* Bump org.springframework.boot:spring-boot-dependencies
Bumps [org.springframework.boot:spring-boot-dependencies](https://github.com/spring-projects/spring-boot) from 2.7.16 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v2.7.16...v3.2.4)
---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-dependencies
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
* Update pom.xml
* Update pom.xml
* Update pom.xml
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonas Kunz
---
.../apm-spring-resttemplate/apm-spring-restclient-test/pom.xml | 2 +-
.../apm-spring-resttemplate-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webmvc/pom.xml | 2 +-
integration-tests/spring-boot-3/pom.xml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
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 83f82ea463..398802f986 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
@@ -20,7 +20,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.2
+ 3.2.4
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 d9095045b8..37b4bb29dd 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
@@ -23,7 +23,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.2
+ 3.2.4
pom
import
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index 3e3a2bfbe9..2f10a4cba4 100644
--- a/apm-agent-plugins/apm-spring-webflux/pom.xml
+++ b/apm-agent-plugins/apm-spring-webflux/pom.xml
@@ -18,7 +18,7 @@
2.7.16
- 3.2.2
+ 3.2.4
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 943d6aaac5..78a4d0c7c6 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
@@ -22,7 +22,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.2
+ 3.2.4
pom
import
diff --git a/apm-agent-plugins/apm-spring-webmvc/pom.xml b/apm-agent-plugins/apm-spring-webmvc/pom.xml
index e105e7f028..9e9c73d10b 100644
--- a/apm-agent-plugins/apm-spring-webmvc/pom.xml
+++ b/apm-agent-plugins/apm-spring-webmvc/pom.xml
@@ -29,7 +29,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.2
+ 3.2.4
pom
import
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index 0ef88d8a29..b744abc7c6 100644
--- a/integration-tests/spring-boot-3/pom.xml
+++ b/integration-tests/spring-boot-3/pom.xml
@@ -30,7 +30,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.2
+ 3.2.4
pom
import
From 750ba4bb09f0fda2885a01e2c7ddaf2678b2d73a Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Mon, 22 Apr 2024 18:12:06 +0200
Subject: [PATCH 026/132] buildkite: fallback if home is not available (#3591)
---
.buildkite/hooks/prepare-common.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/.buildkite/hooks/prepare-common.sh b/.buildkite/hooks/prepare-common.sh
index f5fc876099..7c04356ecf 100644
--- a/.buildkite/hooks/prepare-common.sh
+++ b/.buildkite/hooks/prepare-common.sh
@@ -1,9 +1,17 @@
#!/usr/bin/env bash
-set -euo pipefail
+set -eo pipefail
# Configure the java version
JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
+set +u
+# In case the HOME is not available in the context of the runner.
+if [ -z "${HOME}" ] ; then
+ HOME="${BUILDKITE_BUILD_CHECKOUT_PATH}"
+ export HOME
+fi
JAVA_HOME="${HOME}/.java/openjdk${JAVA_VERSION}"
+set -u
+
export JAVA_HOME
PATH="${JAVA_HOME}/bin:${PATH}"
export PATH
From d63b1cca83141ec61f00d0dfbe07d6aaf9629bba Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Tue, 23 Apr 2024 13:41:34 +0200
Subject: [PATCH 027/132] Prevent cycles in inferred spans (#3588)
---
CHANGELOG.asciidoc | 4 ++
.../agent/impl/transaction/TraceContext.java | 17 ++++-
.../elastic/apm/agent/profiler/CallTree.java | 56 ++++++++++------
.../elastic/apm/agent/profiler/ChildList.java | 64 +++++++++++++++++++
.../apm/agent/profiler/SamplingProfiler.java | 2 +-
.../agent/profiler/CallTreeSpanifyTest.java | 59 ++++++++++++++++-
.../apm/agent/profiler/CallTreeTest.java | 2 +-
7 files changed, 180 insertions(+), 24 deletions(-)
create mode 100644 apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ChildList.java
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 44b9c2f8e5..c04a3f9a2c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
+[float]
+===== Bug fixes
+* Fixed edge case where inferred spans could cause cycles in the trace parent-child relationships, subsequently resulting in the UI crashing - {pull}3588[#3588]
+
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java
index f8854468f0..cc3df527cb 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/TraceContext.java
@@ -64,7 +64,7 @@ public class TraceContext implements Recyclable, co.elastic.apm.agent.tracer.Tra
public static final String ELASTIC_TRACE_PARENT_TEXTUAL_HEADER_NAME = "elastic-apm-traceparent";
public static final String W3C_TRACE_PARENT_TEXTUAL_HEADER_NAME = "traceparent";
public static final String TRACESTATE_HEADER_NAME = "tracestate";
- public static final int SERIALIZED_LENGTH = 42;
+ public static final int SERIALIZED_LENGTH = 51;
private static final int TEXT_HEADER_EXPECTED_LENGTH = 55;
private static final int TEXT_HEADER_TRACE_ID_OFFSET = 3;
private static final int TEXT_HEADER_PARENT_ID_OFFSET = 36;
@@ -227,6 +227,7 @@ private TraceContext(ElasticApmTracer tracer, Id id) {
*
* Note: the {@link #traceId} will still be 128 bit
*
+ *
* @param tracer a valid tracer
*/
public static TraceContext with64BitId(ElasticApmTracer tracer) {
@@ -621,7 +622,7 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
TraceContext that = (TraceContext) o;
return id.equals(that.id) &&
- traceId.equals(that.traceId);
+ traceId.equals(that.traceId);
}
public boolean idEquals(@Nullable TraceContext o) {
@@ -650,6 +651,8 @@ public void serialize(byte[] buffer) {
offset = traceId.toBytes(buffer, offset);
offset = id.toBytes(buffer, offset);
offset = transactionId.toBytes(buffer, offset);
+ buffer[offset++] = parentId.isEmpty() ? (byte) 0 : (byte) 1;
+ offset = parentId.toBytes(buffer, offset);
buffer[offset++] = flags;
buffer[offset++] = (byte) (discardable ? 1 : 0);
ByteUtils.putLong(buffer, offset, clock.getOffset());
@@ -660,6 +663,12 @@ public void deserialize(byte[] buffer, @Nullable String serviceName, @Nullable S
offset += traceId.fromBytes(buffer, offset);
offset += id.fromBytes(buffer, offset);
offset += transactionId.fromBytes(buffer, offset);
+ if (buffer[offset++] != 0) {
+ offset += parentId.fromBytes(buffer, offset);
+ } else {
+ parentId.resetState();
+ offset += 8;
+ }
flags = buffer[offset++];
discardable = buffer[offset++] == (byte) 1;
clock.init(ByteUtils.getLong(buffer, offset));
@@ -672,6 +681,10 @@ public static long getSpanId(byte[] serializedTraceContext) {
return ByteUtils.getLong(serializedTraceContext, 16);
}
+ public static long getParentId(byte[] serializedTraceContext) {
+ return ByteUtils.getLong(serializedTraceContext, 33);
+ }
+
public boolean traceIdAndIdEquals(byte[] serialized) {
return id.dataEquals(serialized, traceId.getLength()) && traceId.dataEquals(serialized, 0);
}
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/CallTree.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/CallTree.java
index 551a74b8be..3042fee406 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/CallTree.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/CallTree.java
@@ -79,9 +79,9 @@ public class CallTree implements Recyclable {
* @see co.elastic.apm.agent.impl.transaction.AbstractSpan#childIds
*/
@Nullable
- private LongList childIds;
+ private ChildList childIds;
@Nullable
- private LongList maybeChildIds;
+ private ChildList maybeChildIds;
public CallTree() {
}
@@ -375,20 +375,21 @@ private void toString(Appendable out, int level) throws IOException {
}
}
- int spanify(CallTree.Root root, TraceContext parentContext) {
+ int spanify(CallTree.Root root, TraceContext parentContext, TraceContext nonInferredParentContext) {
int createdSpans = 0;
if (activeContextOfDirectParent != null) {
parentContext = activeContextOfDirectParent;
+ nonInferredParentContext = activeContextOfDirectParent;
}
Span span = null;
if (!isPillar() || isLeaf()) {
createdSpans++;
- span = asSpan(root, parentContext);
+ span = asSpan(root, parentContext, nonInferredParentContext);
this.isSpan = true;
}
List children = getChildren();
for (int i = 0, size = children.size(); i < size; i++) {
- createdSpans += children.get(i).spanify(root, span != null ? span.getTraceContext() : parentContext);
+ createdSpans += children.get(i).spanify(root, span != null ? span.getTraceContext() : parentContext, nonInferredParentContext);
}
if (span != null) {
span.end(span.getTimestamp() + getDurationUs());
@@ -396,7 +397,7 @@ int spanify(CallTree.Root root, TraceContext parentContext) {
return createdSpans;
}
- protected Span asSpan(Root root, TraceContext parentContext) {
+ protected Span asSpan(Root root, TraceContext parentContext, TraceContext nonInferredParentContext) {
transferMaybeChildIdsToChildIds();
Span span = parentContext.createSpan(root.getEpochMicros(this.start))
.withType("app")
@@ -410,7 +411,21 @@ protected Span asSpan(Root root, TraceContext parentContext) {
}
span.appendToName("#");
span.appendToName(frame.getMethodName());
- span.withChildIds(childIds);
+
+ LongList childSpanIds = null;
+ if (childIds != null) {
+ long expectedParent = nonInferredParentContext.getId().readLong(0);
+ childSpanIds = new LongList(childIds.getSize());
+ for (int i = 0; i < childIds.getSize(); i++) {
+ // to avoid cycles, we only insert child-ids if the parent of the child is also
+ // the parent of the stack of inferred spans inserted
+ if (childIds.getParentId(i) == expectedParent) {
+ childSpanIds.add(childIds.getId(i));
+ }
+ }
+ }
+
+ span.withChildIds(childSpanIds);
// we're not interested in the very bottom of the stack which contains things like accepting and handling connections
if (!root.rootContext.idEquals(parentContext)) {
@@ -498,19 +513,20 @@ public void resetState() {
*
*
* @param id the child span id to add to this call tree element
+ * @param parentId the parent id of the span represented by the id parameter
*/
- public void addMaybeChildId(long id) {
+ public void addMaybeChildId(long id, long parentId) {
if (maybeChildIds == null) {
- maybeChildIds = new LongList();
+ maybeChildIds = new ChildList();
}
- maybeChildIds.add(id);
+ maybeChildIds.add(id, parentId);
}
- public void addChildId(long id) {
+ public void addChildId(long id, long parentId) {
if (childIds == null) {
- childIds = new LongList();
+ childIds = new ChildList();
}
- childIds.add(id);
+ childIds.add(id, parentId);
}
public boolean hasChildIds() {
@@ -541,7 +557,11 @@ void giveChildIdsTo(CallTree giveTo) {
void giveLastChildIdTo(CallTree giveTo) {
if (childIds != null && !childIds.isEmpty()) {
- giveTo.addChildId(childIds.remove(childIds.getSize() - 1));
+ int size = childIds.getSize();
+ long id = childIds.getId(size - 1);
+ long parentId = childIds.getParentId(size - 1);
+ giveTo.addChildId(id, parentId);
+ childIds.removeLast();
}
}
@@ -619,7 +639,7 @@ public void onActivation(byte[] active, long timestamp) {
long spanId = TraceContext.getSpanId(active);
activeSet.add(spanId);
if (!isNestedActivation(topOfStack)) {
- topOfStack.addMaybeChildId(spanId);
+ topOfStack.addMaybeChildId(spanId, TraceContext.getParentId(active));
}
}
}
@@ -628,12 +648,12 @@ private boolean isNestedActivation(CallTree topOfStack) {
return isAnyActive(topOfStack.childIds) || isAnyActive(topOfStack.maybeChildIds);
}
- private boolean isAnyActive(@Nullable LongList spanIds) {
+ private boolean isAnyActive(@Nullable ChildList spanIds) {
if (spanIds == null) {
return false;
}
for (int i = 0, size = spanIds.getSize(); i < size; i++) {
- if (activeSet.contains(spanIds.get(i))) {
+ if (activeSet.contains(spanIds.getId(i))) {
return true;
}
}
@@ -719,7 +739,7 @@ public int spanify() {
int createdSpans = 0;
List callTrees = getChildren();
for (int i = 0, size = callTrees.size(); i < size; i++) {
- createdSpans += callTrees.get(i).spanify(this, rootContext);
+ createdSpans += callTrees.get(i).spanify(this, rootContext, rootContext);
}
return createdSpans;
}
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ChildList.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ChildList.java
new file mode 100644
index 0000000000..c4b079f9f8
--- /dev/null
+++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/ChildList.java
@@ -0,0 +1,64 @@
+/*
+ * 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.profiler;
+
+
+import co.elastic.apm.agent.sdk.internal.collections.LongList;
+
+/** List for maintaining pairs of (spanId,parentIds) both represented as longs. */
+public class ChildList {
+
+ // this list contains the (spanId,parentIds) flattened
+ private final LongList idsWithParentIds = new LongList();
+
+ public void add(long id, long parentId) {
+ idsWithParentIds.add(id);
+ idsWithParentIds.add(parentId);
+ }
+
+ public long getId(int index) {
+ return idsWithParentIds.get(index * 2);
+ }
+
+ public long getParentId(int index) {
+ return idsWithParentIds.get(index * 2 + 1);
+ }
+
+ public int getSize() {
+ return idsWithParentIds.getSize() / 2;
+ }
+
+ public void addAll(ChildList other) {
+ idsWithParentIds.addAll(other.idsWithParentIds);
+ }
+
+ public void clear() {
+ idsWithParentIds.clear();
+ }
+
+ public boolean isEmpty() {
+ return getSize() == 0;
+ }
+
+ public void removeLast() {
+ int size = idsWithParentIds.getSize();
+ idsWithParentIds.remove(size - 1);
+ idsWithParentIds.remove(size - 2);
+ }
+}
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
index 0c8cb3f674..860a0896de 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/SamplingProfiler.java
@@ -106,7 +106,7 @@
* and at least one stack trace.
* Once {@linkplain ActivationEvent#handleDeactivationEvent(SamplingProfiler) handling the deactivation event} of the root span in a thread
* (after which {@link ElasticApmTracer#getActive()} would return {@code null}),
- * the {@link CallTree} is {@linkplain CallTree#spanify(CallTree.Root, TraceContext) converted into regular spans}.
+ * the {@link CallTree} is {@linkplain CallTree#spanify(CallTree.Root, TraceContext, TraceContext) converted into regular spans}.
*
*
* Overall, the allocation rate does not depend on the number of {@link ActivationEvent}s but only on
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeSpanifyTest.java b/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeSpanifyTest.java
index aea204c257..738712e825 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeSpanifyTest.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeSpanifyTest.java
@@ -35,6 +35,7 @@
import org.stagemonitor.configuration.ConfigurationRegistry;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@@ -141,8 +142,62 @@ void testCallTreeWithActiveSpan() {
root.spanify();
assertThat(reporter.getSpans()).hasSize(2);
- assertThat(reporter.getSpans().get(1).getTraceContext().isChildOf(spanContext));
- assertThat(reporter.getSpans().get(0).getTraceContext().isChildOf(rootContext));
+ assertThat(reporter.getSpans().get(0).getTraceContext().isChildOf(spanContext)).isTrue();
+ assertThat(reporter.getSpans().get(1).getTraceContext().isChildOf(rootContext)).isTrue();
+ }
+
+
+ @Test
+ void testSpanWithInvertedActivation() {
+ TraceContext rootContext = CallTreeTest.rootTraceContext(tracer);
+
+ TraceContext childSpanContext = TraceContext.with64BitId(tracer);
+ TraceContext.fromParentContext().asChildOf(childSpanContext, rootContext);
+
+ NoopObjectPool rootPool = NoopObjectPool.ofRecyclable(() -> new CallTree.Root(tracer));
+ NoopObjectPool childPool = NoopObjectPool.ofRecyclable(CallTree::new);
+
+ CallTree.Root root = CallTree.createRoot(rootPool, childSpanContext.serialize(), rootContext.getServiceName(), rootContext.getServiceVersion(), 0);
+ root.addStackTrace(tracer, Collections.singletonList(StackFrame.of("A", "a")), 10_000, childPool, 0);
+
+ root.onActivation(rootContext.serialize(), 20_000);
+ root.onDeactivation(rootContext.serialize(), childSpanContext.serialize(), 30_000);
+
+ root.addStackTrace(tracer, Collections.singletonList(StackFrame.of("A", "a")), 40_000, childPool, 0);
+ root.end(childPool, 0);
+
+ root.spanify();
+
+ assertThat(reporter.getSpans()).hasSize(1);
+ assertThat(reporter.getSpans().get(0).getTraceContext().isChildOf(childSpanContext)).isTrue();
+ // the inferred span should not have any span links because this
+ // span link would cause a cycle in the trace
+ assertThat(reporter.getSpans().get(0).getChildIds().getSize()).isEqualTo(0L);
+ }
+
+ @Test
+ void testSpanWithNestedActivation() {
+ TraceContext rootContext = CallTreeTest.rootTraceContext(tracer);
+
+ NoopObjectPool rootPool = NoopObjectPool.ofRecyclable(() -> new CallTree.Root(tracer));
+ NoopObjectPool childPool = NoopObjectPool.ofRecyclable(CallTree::new);
+
+ CallTree.Root root = CallTree.createRoot(rootPool, rootContext.serialize(), rootContext.getServiceName(), rootContext.getServiceVersion(), 0);
+ root.addStackTrace(tracer, Collections.singletonList(StackFrame.of("A", "a")), 10_000, childPool, 0);
+
+ root.onActivation(rootContext.serialize(), 20_000);
+ root.onDeactivation(rootContext.serialize(), rootContext.serialize(), 30_000);
+
+ root.addStackTrace(tracer, Collections.singletonList(StackFrame.of("A", "a")), 40_000, childPool, 0);
+ root.end(childPool, 0);
+
+ root.spanify();
+
+ assertThat(reporter.getSpans()).hasSize(1);
+ assertThat(reporter.getSpans().get(0).getTraceContext().isChildOf(rootContext)).isTrue();
+ // the inferred span should not have any span links because this
+ // span link would cause a cycle in the trace
+ assertThat(reporter.getSpans().get(0).getChildIds().getSize()).isEqualTo(0L);
}
}
diff --git a/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeTest.java b/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeTest.java
index b18d86ecdd..ae64d3387a 100644
--- a/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeTest.java
+++ b/apm-agent-plugins/apm-profiling-plugin/src/test/java/co/elastic/apm/agent/profiler/CallTreeTest.java
@@ -120,7 +120,7 @@ void testCallTree() {
@Test
void testGiveEmptyChildIdsTo() {
CallTree rich = new CallTree();
- rich.addChildId(42);
+ rich.addChildId(42, 0L);
CallTree robinHood = new CallTree();
CallTree poor = new CallTree();
From c98702088fdce28a02a4a39c42f6f9795cb25cc3 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Wed, 24 Apr 2024 11:45:32 +0200
Subject: [PATCH 028/132] [ci] add list of published artifacts (#3595)
---
.ci/scripts/published-artifacts-list.sh | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100755 .ci/scripts/published-artifacts-list.sh
diff --git a/.ci/scripts/published-artifacts-list.sh b/.ci/scripts/published-artifacts-list.sh
new file mode 100755
index 0000000000..32edfc6d5a
--- /dev/null
+++ b/.ci/scripts/published-artifacts-list.sh
@@ -0,0 +1,21 @@
+#!/bin/env bash
+
+targets="$(find . -type d -name 'target'|grep -v apm-agent-plugins|grep -v integration-tests|sort)"
+
+for t in ${targets}; do
+ find "${t}" \
+ -name '*.jar' \
+ | grep -v '\-sources.jar' \
+ | grep -v '\-tests.jar' \
+ | grep -v '\-javadoc.jar' \
+ | grep -v 'original-' \
+ | grep -v 'classes/' \
+ | grep -v 'benchmarks' \
+ | grep -v 'apm-agent-bootstrap' \
+ | grep -v 'apm-agent-builds' \
+ | grep -v 'apm-agent-cached-lookup-key' \
+ | grep -v 'apm-agent-core' \
+ | grep -v 'apm-agent-common' \
+ | grep -v 'apm-agent-lambda-layer' \
+ | grep -v 'apm-agent-premain'
+done
From 08188e6f4a3740ed8912a39eb8e0409efe839890 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 24 Apr 2024 15:43:06 +0200
Subject: [PATCH 029/132] Bump version.mockito from 5.1.1 to 5.11.0 (#3587)
Bumps `version.mockito` from 5.1.1 to 5.11.0.
Updates `org.mockito:mockito-core` from 5.1.1 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.11.0)
Updates `org.mockito:mockito-subclass` from 5.1.1 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.11.0)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-subclass
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 13899352cb..bbf4aeac9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
9.6
5.4.0
- 5.1.1
+ 5.11.0
1.17
From 9b0c70a0a54ceb9cafb753f979c90fae47dfe1bc Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 25 Apr 2024 11:08:19 +0200
Subject: [PATCH 030/132] github-actions: enable provenance for the jar files
(#3594)
---
.buildkite/release.yml | 4 ++++
.buildkite/snapshot.yml | 4 ++++
.ci/release.sh | 6 ++++++
.ci/scripts/published-artifacts-list.sh | 2 +-
.ci/snapshot.sh | 6 ++++++
.github/workflows/release.yml | 20 ++++++++++++++++++++
.github/workflows/snapshot.yml | 23 ++++++++++++++++++++++-
7 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/.buildkite/release.yml b/.buildkite/release.yml
index 347f35358e..f63a7e06dd 100644
--- a/.buildkite/release.yml
+++ b/.buildkite/release.yml
@@ -2,6 +2,9 @@ agents:
provider: "gcp"
image: "family/apm-agent-java-ubuntu-2204"
+env:
+ TARBALL_FILE: ${TARBALL_FILE:-artifacts.tar}
+
steps:
- label: "Run the release"
key: "release"
@@ -9,6 +12,7 @@ steps:
artifact_paths:
- "release.txt"
- "**/target/*"
+ - "${TARBALL_FILE}"
notify:
- slack: "#apm-agent-java"
diff --git a/.buildkite/snapshot.yml b/.buildkite/snapshot.yml
index c5cf1bcb79..899d962e7e 100644
--- a/.buildkite/snapshot.yml
+++ b/.buildkite/snapshot.yml
@@ -2,6 +2,9 @@ agents:
provider: "gcp"
image: "family/apm-agent-java-ubuntu-2204"
+env:
+ TARBALL_FILE: ${TARBALL_FILE:-artifacts.tar}
+
steps:
- label: "Run the snapshot"
key: "release"
@@ -9,6 +12,7 @@ steps:
artifact_paths:
- "snapshot.txt"
- "**/target/*"
+ - "${TARBALL_FILE}"
notify:
- slack: "#apm-agent-java"
diff --git a/.ci/release.sh b/.ci/release.sh
index b05947ce95..2f7c4bd832 100755
--- a/.ci/release.sh
+++ b/.ci/release.sh
@@ -32,3 +32,9 @@ fi
echo "--- Deploy the release :package: [./mvnw $GOAL)] $DRY_RUN_MSG"
./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee release.txt
+
+echo "--- Archive the target folder with jar files"
+echo 'gather artifacts'
+.ci/published-artifacts-list.sh | tee artifacts.list
+echo 'create tarbal'
+tar -cvf "${TARBALL_FILE:-artifacts.tar}" -T artifacts.list
diff --git a/.ci/scripts/published-artifacts-list.sh b/.ci/scripts/published-artifacts-list.sh
index 32edfc6d5a..773a1671fe 100755
--- a/.ci/scripts/published-artifacts-list.sh
+++ b/.ci/scripts/published-artifacts-list.sh
@@ -1,4 +1,4 @@
-#!/bin/env bash
+#!/usr/bin/env bash
targets="$(find . -type d -name 'target'|grep -v apm-agent-plugins|grep -v integration-tests|sort)"
diff --git a/.ci/snapshot.sh b/.ci/snapshot.sh
index a11cd4eb9a..5fa49b94a6 100755
--- a/.ci/snapshot.sh
+++ b/.ci/snapshot.sh
@@ -34,3 +34,9 @@ fi
echo "--- Deploy the snapshot :package: [./mvnw $GOAL)] $DRY_RUN_MSG"
./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee snapshot.txt
+
+echo "--- Archive the target folder with jar files"
+echo 'gather artifacts'
+.ci/published-artifacts-list.sh | tee artifacts.list
+echo 'create tarbal'
+tar -cvf "${TARBALL_FILE:-artifacts.tar}" -T artifacts.list
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bc9b9d16e6..76d9bcd125 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -74,6 +74,11 @@ jobs:
runs-on: ubuntu-latest
needs:
- validate-tag
+ permissions:
+ contents: write
+ id-token: write
+ env:
+ TARBALL_FILE: artifacts.tar
steps:
- id: buildkite
continue-on-error: true
@@ -86,8 +91,23 @@ jobs:
pipeline: apm-agent-java-release
waitFor: true
printBuildLogs: false
+ artifactName: releases
+ artifactPath: ${{ env.TARBALL_FILE }}
buildEnvVars: |
dry_run=${{ inputs.dry_run || 'false' }}
+ TARBALL_FILE=${{ env.TARBALL_FILE }}
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: releases
+
+ - name: untar the buildkite tarball
+ run: tar xvf ${{ env.TARBALL_FILE }}
+
+ - name: generate build provenance
+ uses: github-early-access/generate-build-provenance@main
+ with:
+ subject-path: "${{ github.workspace }}/**/target/*.jar"
await-maven-central-artifact:
name: "Wait for artifacts to be available on maven central"
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 9a50021824..30388ce869 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -38,6 +38,11 @@ jobs:
runs-on: ubuntu-latest
needs:
- validate
+ permissions:
+ contents: write
+ id-token: write
+ env:
+ TARBALL_FILE: artifacts.tar
if: ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
steps:
- id: buildkite
@@ -48,10 +53,26 @@ jobs:
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-java-snapshot
- waitFor: false
+ pipelineBranch: ${{ github.ref_name }}
+ artifactName: snapshots
+ artifactPath: ${{ env.TARBALL_FILE }}
+ waitFor: true
printBuildLogs: false
buildEnvVars: |
dry_run=${{ inputs.dry_run || 'false' }}
+ TARBALL_FILE=${{ env.TARBALL_FILE }}
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: snapshots
+
+ - name: untar the buildkite tarball
+ run: tar xvf ${{ env.TARBALL_FILE }}
+
+ - name: generate build provenance
+ uses: github-early-access/generate-build-provenance@main
+ with:
+ subject-path: "${{ github.workspace }}/**/target/*.jar"
- if: ${{ failure() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
From 623eaae869f16de8b6a9c5a7c87e5a75f15d2f6b Mon Sep 17 00:00:00 2001
From: apmmachine <58790750+apmmachine@users.noreply.github.com>
Date: Thu, 25 Apr 2024 05:11:40 -0400
Subject: [PATCH 031/132] chore: APM agent json server schema
a76e999543efb3ba803c9a57dd13a4f6b... (#3584)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
... 3ffa7e1
Made with ❤️️ by updatecli
Co-authored-by: apmmachine
---
.../resources/apm-server-schema/current/metadata.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/apm-agent-core/src/test/resources/apm-server-schema/current/metadata.json b/apm-agent-core/src/test/resources/apm-server-schema/current/metadata.json
index 7103bbeb5a..1122ed68c2 100644
--- a/apm-agent-core/src/test/resources/apm-server-schema/current/metadata.json
+++ b/apm-agent-core/src/test/resources/apm-server-schema/current/metadata.json
@@ -441,6 +441,14 @@
],
"maxLength": 1024
},
+ "host_id": {
+ "description": "The OpenTelemetry semantic conventions compliant \"host.id\" attribute, if available.",
+ "type": [
+ "null",
+ "string"
+ ],
+ "maxLength": 1024
+ },
"hostname": {
"description": "Deprecated: Use ConfiguredHostname and DetectedHostname instead. DeprecatedHostname is the host name of the system the service is running on. It does not distinguish between configured and detected hostname and therefore is deprecated and only used if no other hostname information is available.",
"type": [
From 2105bf4a107372492ce119839f733f680f3d289f Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Thu, 25 Apr 2024 11:34:51 +0200
Subject: [PATCH 032/132] [ci] fix GH release version tag (#3596)
---
.github/workflows/release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 76d9bcd125..1e133e6da8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -266,7 +266,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
- gh release create ${{ env.RELEASE_VERSION }} \
+ gh release create ${{ env.RELEASE_VERSION_TAG }} \
--title="Release ${{ env.RELEASE_VERSION }}" \
--notes="[Release Notes for ${{ env.RELEASE_VERSION }}](https://www.elastic.co/guide/en/apm/agent/java/current/release-notes-${{ steps.get_dotx_branch.outputs.dotx_branch }}.html#release-notes-${{ env.RELEASE_VERSION }})
${{ needs.publish-aws-lambda.outputs.arn_content }}"
From ad564ae387daef48540c6446cdafa200c1b4152a Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Thu, 25 Apr 2024 12:17:05 +0200
Subject: [PATCH 033/132] [ci] fix artifact list path (#3597)
---
.ci/{scripts => }/published-artifacts-list.sh | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename .ci/{scripts => }/published-artifacts-list.sh (100%)
diff --git a/.ci/scripts/published-artifacts-list.sh b/.ci/published-artifacts-list.sh
similarity index 100%
rename from .ci/scripts/published-artifacts-list.sh
rename to .ci/published-artifacts-list.sh
From 7ee2898a20e879d03dacdc0b05fe480f86a13676 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Thu, 25 Apr 2024 14:58:00 +0200
Subject: [PATCH 034/132] Upgrade JDK compatibility tests (#3599)
* Upgrade JDK compatibility tests
* Added JDK 23 ea
* Attempt to set net.bytebuddy.experimental for EA versions
* Remove java 23-ea tests
---
.github/workflows/main.yml | 2 +-
.../src/test/java/co/elastic/apm/agent/util/JdkVersionTest.java | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 419c369cd3..0d5944b6e3 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -301,7 +301,7 @@ jobs:
distribution: 'temurin'
- version: 21
distribution: 'temurin'
- - version: 22-ea
+ - version: 22
distribution: 'temurin'
steps:
- uses: actions/checkout@v4
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/util/JdkVersionTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/JdkVersionTest.java
index 324ddf7014..c4d8b958d9 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/util/JdkVersionTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/JdkVersionTest.java
@@ -33,7 +33,6 @@ public class JdkVersionTest {
private static List releaseSchedule() {
// from https://www.oracle.com/java/technologies/java-se-support-roadmap.html
return List.of(
- Arguments.of(22, LocalDate.parse("2024-04-01")),
Arguments.of(23, LocalDate.parse("2024-10-01")),
Arguments.of(24, LocalDate.parse("2025-04-01")),
Arguments.of(25, LocalDate.parse("2025-10-01"))
From 1d512397b47640ebbcc8478b34b2761cdb332ce0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 25 Apr 2024 14:17:45 +0000
Subject: [PATCH 035/132] Bump version.ecs.logging from 1.5.0 to 1.6.0 (#3585)
Bumps `version.ecs.logging` from 1.5.0 to 1.6.0.
Updates `co.elastic.logging:log4j2-ecs-layout` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/elastic/ecs-logging-java/releases)
- [Commits](https://github.com/elastic/ecs-logging-java/compare/v1.5.0...v1.6.0)
Updates `co.elastic.logging:logback-ecs-encoder` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/elastic/ecs-logging-java/releases)
- [Commits](https://github.com/elastic/ecs-logging-java/compare/v1.5.0...v1.6.0)
Updates `co.elastic.logging:log4j-ecs-layout` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/elastic/ecs-logging-java/releases)
- [Commits](https://github.com/elastic/ecs-logging-java/compare/v1.5.0...v1.6.0)
Updates `co.elastic.logging:jul-ecs-formatter` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/elastic/ecs-logging-java/releases)
- [Commits](https://github.com/elastic/ecs-logging-java/compare/v1.5.0...v1.6.0)
Updates `co.elastic.logging:jboss-logmanager-ecs-formatter` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/elastic/ecs-logging-java/releases)
- [Commits](https://github.com/elastic/ecs-logging-java/compare/v1.5.0...v1.6.0)
---
updated-dependencies:
- dependency-name: co.elastic.logging:log4j2-ecs-layout
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: co.elastic.logging:logback-ecs-encoder
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: co.elastic.logging:log4j-ecs-layout
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: co.elastic.logging:jul-ecs-formatter
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: co.elastic.logging:jboss-logmanager-ecs-formatter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bbf4aeac9e..59fbc6d73e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,7 +126,7 @@
(https://nvd.nist.gov/vuln/detail/CVE-2020-9488#vulnCurrentDescriptionTitle), the SMTP appender is
excluded from the build and not packaged into the agent artifacts -->
2.12.4
- 1.5.0
+ 1.6.0
5.0.15.RELEASE
9.4.11.v20180605
1.3.3
From c916209966a80d3a0633c46bb39ebd9e8867355f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 25 Apr 2024 15:38:55 +0000
Subject: [PATCH 036/132] Bump org.apache.logging.log4j:log4j-bom from 2.22.1
to 2.23.1 (#3565)
Bumps [org.apache.logging.log4j:log4j-bom](https://github.com/apache/logging-log4j2) from 2.22.1 to 2.23.1.
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.22.1...rel/2.23.1)
---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-bom
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-builds/apm-agent-java8/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apm-agent-builds/apm-agent-java8/pom.xml b/apm-agent-builds/apm-agent-java8/pom.xml
index 48f8f81e31..87cca26d6b 100644
--- a/apm-agent-builds/apm-agent-java8/pom.xml
+++ b/apm-agent-builds/apm-agent-java8/pom.xml
@@ -21,7 +21,7 @@
org.apache.logging.log4j
log4j-bom
- 2.22.1
+ 2.23.1
import
pom
From 35e0d6d0de0b6d1753f2e6bdd5678a10c2267cd4 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Fri, 26 Apr 2024 13:25:12 +0200
Subject: [PATCH 037/132] github-action: add attestations scope (#3601)
---
.github/workflows/release.yml | 1 +
.github/workflows/snapshot.yml | 1 +
2 files changed, 2 insertions(+)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1e133e6da8..9a36437ca7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -75,6 +75,7 @@ jobs:
needs:
- validate-tag
permissions:
+ attestations: write
contents: write
id-token: write
env:
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 30388ce869..f985425da2 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -39,6 +39,7 @@ jobs:
needs:
- validate
permissions:
+ attestations: write
contents: write
id-token: write
env:
From cc4d8a16a7aa85099bcb8b14da0cffb3e37b9d63 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Fri, 26 Apr 2024 16:41:55 +0200
Subject: [PATCH 038/132] Universal profiling integration: write shared memory
(#3598)
---------
Co-authored-by: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
---
.../apm/agent/common/util/AgentInfo.java | 3 +-
apm-agent-core/pom.xml | 5 +
.../UniversalProfilingConfiguration.java | 72 ++++++
.../apm/agent/impl/ElasticApmTracer.java | 10 +-
.../apm/agent/impl/metadata/SystemInfo.java | 2 +-
.../apm/agent/impl/transaction/Id.java | 4 +
.../ProfilerSharedMemoryWriter.java | 114 +++++++++
.../UniversalProfilingIntegration.java | 117 +++++++++
....configuration.ConfigurationOptionProvider | 1 +
.../UniversalProfilingIntegrationTest.java | 230 ++++++++++++++++++
10 files changed, 555 insertions(+), 3 deletions(-)
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/UniversalProfilingConfiguration.java
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/ProfilerSharedMemoryWriter.java
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegration.java
create mode 100644 apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegrationTest.java
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 b677ceb7c4..dbd2b1a9de 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
@@ -36,7 +36,8 @@ public class AgentInfo {
"com.blogspot.mydailyjava.weaklockfree",
"com.lmax.disruptor",
"com.dslplatform.json",
- "com.googlecode.concurrentlinkedhashmap"
+ "com.googlecode.concurrentlinkedhashmap",
+ "co.elastic.otel"
));
private static final Set agentRootPackages = new HashSet<>(Arrays.asList(
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index cb04140691..5f35f7912d 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -100,6 +100,11 @@
HdrHistogram
2.1.11
+
+ co.elastic.otel
+ jvmti-access
+ 0.3.0
+
- 1.14.12
+ 1.14.14
9.6
5.4.0
From c339b002ddc60cdd4aee2f7ba823cf814d8658a7 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Thu, 2 May 2024 10:21:05 +0200
Subject: [PATCH 042/132] Universal Profiling integration: open socket for
communication (#3602)
---
.../UniversalProfilingIntegration.java | 117 +++++++++++++++++-
.../UniversalProfilingIntegrationTest.java | 78 +++++++++++-
2 files changed, 190 insertions(+), 5 deletions(-)
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegration.java
index 251aeaf6df..33897cbfa6 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegration.java
@@ -28,14 +28,34 @@
import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.util.ExecutorUtils;
import co.elastic.otel.JvmtiAccess;
import co.elastic.otel.UniversalProfilingCorrelation;
+import co.elastic.otel.profiler.DecodeException;
+import co.elastic.otel.profiler.ProfilerMessage;
+import co.elastic.otel.profiler.ProfilerRegistrationMessage;
+import co.elastic.otel.profiler.TraceCorrelationMessage;
import javax.annotation.Nullable;
import java.nio.ByteBuffer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Base64;
+import java.util.Random;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
public class UniversalProfilingIntegration {
+ /**
+ * The frequency at which the processor polls the unix domain socket for new messages from the
+ * profiler.
+ */
+ static final long POLL_FREQUENCY_MS = 20;
+
private static final Logger log = LoggerFactory.getLogger(UniversalProfilingIntegration.class);
private volatile ElasticApmTracer tracer;
@@ -43,6 +63,11 @@ public class UniversalProfilingIntegration {
// Visible for testing
volatile boolean isActive = false;
+ // Visible for testing
+ String socketPath = null;
+
+ private ScheduledExecutorService executor;
+
private ActivationListener activationListener = new ActivationListener() {
@Override
@@ -70,22 +95,51 @@ public void start(ElasticApmTracer tracer) {
try {
log.debug("Starting universal profiling correlation");
+ socketPath = openProfilerSocket(config.getSocketDir());
+
CoreConfiguration coreConfig = tracer.getConfig(CoreConfiguration.class);
ByteBuffer processCorrelationStorage = ProfilerSharedMemoryWriter.generateProcessCorrelationStorage(
- coreConfig.getServiceName(), coreConfig.getEnvironment(), "");
+ coreConfig.getServiceName(), coreConfig.getEnvironment(), socketPath);
UniversalProfilingCorrelation.setProcessStorage(processCorrelationStorage);
+ executor = ExecutorUtils.createSingleThreadSchedulingDaemonPool("profiling-integration");
+ executor.scheduleWithFixedDelay(new Runnable() {
+ @Override
+ public void run() {
+ periodicTimer();
+ }
+ }, POLL_FREQUENCY_MS, POLL_FREQUENCY_MS, TimeUnit.MILLISECONDS);
+
isActive = true;
tracer.registerSpanListener(activationListener);
} catch (Exception e) {
log.error("Failed to start universal profiling integration", e);
+ if (socketPath != null) {
+ try {
+ UniversalProfilingCorrelation.stopProfilerReturnChannel();
+ socketPath = null;
+ } catch (Exception e2) {
+ log.error("Failed to clean up universal profiling integration socket", e2);
+ }
+ }
}
}
+ private void periodicTimer() {
+ consumeProfilerMessages();
+ }
+
public void stop() {
try {
+ if (executor != null) {
+ executor.shutdown();
+ executor.awaitTermination(10, TimeUnit.SECONDS);
+ executor = null;
+ }
if (isActive) {
+ UniversalProfilingCorrelation.stopProfilerReturnChannel();
JvmtiAccess.destroy();
+ isActive = false;
}
} catch (Exception e) {
log.error("Failed to stop universal profiling integration", e);
@@ -114,4 +168,65 @@ public void correlateAndReport(Transaction endedTransaction) {
public void drop(Transaction endedTransaction) {
//TODO: remove dropped transactions from correlation storage without reporting
}
+
+
+ private String openProfilerSocket(String socketDir) {
+ Path dir = Paths.get(socketDir);
+ if (!Files.exists(dir) && !dir.toFile().mkdirs()) {
+ throw new IllegalArgumentException("Could not create directory '" + socketDir + "'");
+ }
+ Path socketFile;
+ do {
+ socketFile = dir.resolve(randomSocketFileName());
+ } while (Files.exists(socketFile));
+
+ String absolutePath = socketFile.toAbsolutePath().toString();
+ log.debug("Opening profiler correlation socket {}", absolutePath);
+ UniversalProfilingCorrelation.startProfilerReturnChannel(absolutePath);
+ return absolutePath;
+ }
+
+ private String randomSocketFileName() {
+ StringBuilder name = new StringBuilder("essock");
+ String allowedChars = "abcdefghijklmonpqrstuvwxzyABCDEFGHIJKLMONPQRSTUVWXYZ0123456789";
+ Random rnd = new Random();
+ for (int i = 0; i < 8; i++) {
+ int idx = rnd.nextInt(allowedChars.length());
+ name.append(allowedChars.charAt(idx));
+ }
+ return name.toString();
+ }
+
+ private void consumeProfilerMessages() {
+ try {
+ while (true) {
+ try {
+ ProfilerMessage message =
+ UniversalProfilingCorrelation.readProfilerReturnChannelMessage();
+ if (message == null) {
+ break;
+ } else if (message instanceof TraceCorrelationMessage) {
+ handleMessage((TraceCorrelationMessage) message);
+ } else if (message instanceof ProfilerRegistrationMessage) {
+ handleMessage((ProfilerRegistrationMessage) message);
+ } else {
+ log.debug("Received unknown message type from profiler: {}", message);
+ }
+ } catch (DecodeException e) {
+ log.warn("Failed to read profiler message", e);
+ // intentionally no break here, subsequent messages might be decodeable
+ }
+ }
+ } catch (Exception e) {
+ log.error("Cannot read from profiler socket", e);
+ }
+ }
+
+ private void handleMessage(ProfilerRegistrationMessage message) {
+ //TODO: handle message
+ }
+
+ private void handleMessage(TraceCorrelationMessage message) {
+ //TODO: handle message
+ }
}
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegrationTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegrationTest.java
index 867efae359..81b64c67cb 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegrationTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/UniversalProfilingIntegrationTest.java
@@ -38,6 +38,7 @@
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
+import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.stagemonitor.configuration.ConfigurationRegistry;
@@ -46,6 +47,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.function.Consumer;
import static co.elastic.apm.agent.testutils.assertions.Assertions.assertThat;
@@ -62,6 +66,16 @@ public class UniversalProfilingIntegrationTest {
private TestObjectPoolFactory poolFactory;
+ @TempDir
+ Path tempDir;
+
+ void setupTracer() {
+ setupTracer(config -> {
+ UniversalProfilingConfiguration conf = config.getConfig(UniversalProfilingConfiguration.class);
+ doReturn(true).when(conf).isEnabled();
+ doReturn(tempDir.toAbsolutePath().toString()).when(conf).getSocketDir();
+ });
+ }
void setupTracer(Consumer configCustomizer) {
ConfigurationRegistry config = SpyConfiguration.createSpyConfig();
configCustomizer.accept(config);
@@ -96,6 +110,7 @@ public void ensureDisabledOnWindows() {
verify(mockTracer, never()).registerSpanListener(any());
assertThat(universalProfilingIntegration.isActive).isFalse();
+ assertThat(universalProfilingIntegration.socketPath).isNull();
}
@Test
@@ -107,6 +122,7 @@ public void ensureDisabledByDefault() {
verify(mockTracer, never()).registerSpanListener(any());
assertThat(universalProfilingIntegration.isActive).isFalse();
+ assertThat(universalProfilingIntegration.socketPath).isNull();
}
@Nested
@@ -115,8 +131,7 @@ class SharedMemory {
@Test
public void testNestedActivations() {
- setupTracer(conf -> doReturn(true)
- .when(conf.getConfig(UniversalProfilingConfiguration.class)).isEnabled());
+ setupTracer();
Transaction first = tracer.startRootTransaction(null);
Transaction second = tracer.startRootTransaction(null);
@@ -168,7 +183,9 @@ public void testNestedActivations() {
@ValueSource(strings = {"my nameßspace", ""})
public void testProcessStoragePopulated(String environment) {
setupTracer(conf -> {
- doReturn(true).when(conf.getConfig(UniversalProfilingConfiguration.class)).isEnabled();
+ UniversalProfilingConfiguration profConfig = conf.getConfig(UniversalProfilingConfiguration.class);
+ doReturn(true).when(profConfig).isEnabled();
+ doReturn(tempDir.toAbsolutePath().toString()).when(profConfig).getSocketDir();
CoreConfiguration core = conf.getConfig(CoreConfiguration.class);
doReturn("service Ä 1").when(core).getServiceName();
doReturn(environment).when(core).getEnvironment();
@@ -179,7 +196,8 @@ public void testProcessStoragePopulated(String environment) {
assertThat(buffer.getChar()).describedAs("layout-minor-version").isEqualTo((char) 1);
assertThat(readUtf8Str(buffer)).isEqualTo("service Ä 1");
assertThat(readUtf8Str(buffer)).isEqualTo(environment);
- assertThat(readUtf8Str(buffer)).describedAs("socket-path").isEqualTo("");
+ assertThat(readUtf8Str(buffer)).describedAs("socket-path")
+ .startsWith(tempDir.toAbsolutePath().toString() + "/essock");
}
private String readUtf8Str(ByteBuffer buffer) {
@@ -220,6 +238,58 @@ static void checkTlsIs(@Nullable AbstractSpan> span) {
}
}
+ @DisabledOnOs(OS.WINDOWS)
+ @Nested
+ class SpanCorrelation {
+
+ @Test
+ void badSocketPath() throws Exception {
+ Path notADir = tempDir.resolve("not_a_dir");
+ Files.createFile(notADir);
+ String absPath = notADir.toAbsolutePath().toString();
+
+ ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig();
+ UniversalProfilingConfiguration config = configRegistry.getConfig(UniversalProfilingConfiguration.class);
+
+ doReturn(true).when(config).isEnabled();
+ doReturn(absPath).when(config).getSocketDir();
+
+ UniversalProfilingIntegration universalProfilingIntegration = new UniversalProfilingIntegration();
+ ElasticApmTracer mockTracer = MockTracer.create(configRegistry);
+
+ universalProfilingIntegration.start(mockTracer);
+
+ verify(mockTracer, never()).registerSpanListener(any());
+ assertThat(universalProfilingIntegration.isActive).isFalse();
+ assertThat(universalProfilingIntegration.socketPath).isNull();
+ }
+
+ @Test
+ void socketParentDirCreated() throws Exception {
+ Path subDirs = tempDir.resolve("create/me");
+ String absolute = subDirs.toAbsolutePath().toString();
+
+ ConfigurationRegistry configRegistry = SpyConfiguration.createSpyConfig();
+ UniversalProfilingConfiguration config = configRegistry.getConfig(UniversalProfilingConfiguration.class);
+
+ doReturn(true).when(config).isEnabled();
+ doReturn(absolute).when(config).getSocketDir();
+
+ UniversalProfilingIntegration universalProfilingIntegration = new UniversalProfilingIntegration();
+ ElasticApmTracer mockTracer = MockTracer.create(configRegistry);
+
+ universalProfilingIntegration.start(mockTracer);
+ try {
+ assertThat(Paths.get(universalProfilingIntegration.socketPath)).exists();
+ assertThat(universalProfilingIntegration.socketPath).startsWith(absolute + "/");
+ } finally {
+ universalProfilingIntegration.stop();
+ }
+ }
+
+ }
+
+
private static byte[] idToBytes(Id id) {
byte[] buff = new byte[32];
int len = id.toBytes(buff, 0);
From b14f6588f6c639de29cc19c9df8731ac494a185d Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Thu, 2 May 2024 14:57:16 +0200
Subject: [PATCH 043/132] Fix NPE in dropped spans stats (#3590)
* fix npe
* update changelog
---
CHANGELOG.asciidoc | 1 +
.../elastic/apm/agent/impl/transaction/DroppedSpanStats.java | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c04a3f9a2c..0cdeb84dbe 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,6 +34,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Bug fixes
* Fixed edge case where inferred spans could cause cycles in the trace parent-child relationships, subsequently resulting in the UI crashing - {pull}3588[#3588]
+* Fix NPE in dropped spans statistics - {pull}3590[#3590]
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
index ff25b9596b..74bcf45c95 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
@@ -190,10 +190,13 @@ public void captureDroppedSpan(Span span) {
private Stats getOrCreateStats(ServiceTarget serviceTarget, Outcome outcome) {
StatsKey statsKey = statsKeyObjectPool.createInstance().init(serviceTarget, outcome);
Stats stats = statsMap.get(statsKey);
- if (stats != null || statsMap.size() > 127) {
+ if (stats != null) {
statsKeyObjectPool.recycle(statsKey);
return stats;
}
+ if (statsMap.size() > 127) {
+ statsKeyObjectPool.recycle(statsKey);
+ }
stats = statsObjectPool.createInstance();
From 1f1857b02849bedb248c813848ed59bcdca40d3c Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Thu, 2 May 2024 15:36:42 +0200
Subject: [PATCH 044/132] Universal profiling integration: Added serialization
of stacktrace IDs as profiler_stack_trace_ids otel attributes (#3607)
---
.../apm/agent/impl/ElasticApmTracer.java | 18 ++++++++
.../apm/agent/impl/transaction/Id.java | 5 +++
.../agent/impl/transaction/Transaction.java | 32 ++++++++++++++
.../serialize/Base64SerializationUtils.java | 43 +++++++++++++++++++
.../report/serialize/DslJsonSerializer.java | 39 +++++++++++++++--
.../Base64SerializationUtilTest.java | 41 ++++++++++++++++++
.../serialize/DslJsonSerializerTest.java | 25 +++++++++++
7 files changed, 199 insertions(+), 4 deletions(-)
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtils.java
create mode 100644 apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtilTest.java
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
index abc6ec489f..025de06219 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
@@ -34,9 +34,11 @@
import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
import co.elastic.apm.agent.impl.metadata.NameAndIdField;
import co.elastic.apm.agent.impl.metadata.ServiceFactory;
+import co.elastic.apm.agent.impl.transaction.Id;
import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
import co.elastic.apm.agent.tracer.metrics.Labels;
+import co.elastic.apm.agent.tracer.pooling.Allocator;
import co.elastic.apm.agent.tracer.service.Service;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
import co.elastic.apm.agent.configuration.SpanConfiguration;
@@ -127,6 +129,7 @@ public class ElasticApmTracer implements Tracer {
private final ObjectPool spanPool;
private final ObjectPool errorPool;
private final ObjectPool spanLinkPool;
+ private final ObjectPool profilingCorrelationStackTraceIdPool;
private final Reporter reporter;
private final ObjectPoolFactory objectPoolFactory;
@@ -245,6 +248,13 @@ public void onChange(ConfigurationOption> configurationOption, Boolean oldValu
// span links pool allows for 10X the maximum allowed span links per span
spanLinkPool = poolFactory.createSpanLinkPool(AbstractSpan.MAX_ALLOWED_SPAN_LINKS * 10, this);
+ profilingCorrelationStackTraceIdPool = poolFactory.createRecyclableObjectPool(maxPooledElements, new Allocator() {
+ @Override
+ public Id createInstance() {
+ return Id.new128BitId();
+ }
+ });
+
sampler = ProbabilitySampler.of(coreConfiguration.getSampleRate().get());
coreConfiguration.getSampleRate().addChangeListener(new ConfigurationOption.ChangeListener() {
@Override
@@ -604,6 +614,10 @@ public TraceContext createSpanLink() {
return spanLinkPool.createInstance();
}
+ public Id createProfilingCorrelationStackTraceId() {
+ return profilingCorrelationStackTraceIdPool.createInstance();
+ }
+
public void recycle(Transaction transaction) {
transactionPool.recycle(transaction);
}
@@ -620,6 +634,10 @@ public void recycle(TraceContext traceContext) {
spanLinkPool.recycle(traceContext);
}
+ public void recycleProfilingCorrelationStackTraceId(Id id) {
+ profilingCorrelationStackTraceIdPool.recycle(id);
+ }
+
public synchronized void stop() {
if (tracerState == TracerState.STOPPED) {
// may happen if explicitly stopped in a unit test and executed again within a shutdown hook
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Id.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Id.java
index 5736124dce..899bf68d28 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Id.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Id.java
@@ -18,6 +18,7 @@
*/
package co.elastic.apm.agent.impl.transaction;
+import co.elastic.apm.agent.report.serialize.Base64SerializationUtils;
import co.elastic.apm.agent.report.serialize.HexSerializationUtils;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import co.elastic.apm.agent.tracer.util.HexUtils;
@@ -175,6 +176,10 @@ public void writeAsHex(JsonWriter jw) {
HexSerializationUtils.writeBytesAsHex(data, jw);
}
+ public void writeAsBase64UrlSafe(JsonWriter jw) {
+ Base64SerializationUtils.writeBytesAsBase64UrlSafe(data, jw);
+ }
+
public void writeAsHex(StringBuilder sb) {
HexUtils.writeBytesAsHex(data, sb);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
index ff3ca395c7..83213a352c 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/Transaction.java
@@ -37,6 +37,7 @@
import org.HdrHistogram.WriterReaderPhaser;
import javax.annotation.Nullable;
+import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -107,6 +108,8 @@ public class Transaction extends AbstractSpan implements co.elastic
@Nullable
private Throwable pendingException;
+ private final ArrayList profilingCorrelationStackTraceIds = new ArrayList<>();
+
/**
* Faas
*
@@ -341,9 +344,23 @@ public void resetState() {
faas.resetState();
wasActivated.set(false);
pendingException = null;
+ recycleProfilingCorrelationStackTraceIds();
// don't clear timerBySpanTypeAndSubtype map (see field-level javadoc)
}
+ private void recycleProfilingCorrelationStackTraceIds() {
+ for (Id toRecycle : profilingCorrelationStackTraceIds) {
+ tracer.recycleProfilingCorrelationStackTraceId(toRecycle);
+ }
+ if (profilingCorrelationStackTraceIds.size() > 100) {
+ profilingCorrelationStackTraceIds.clear();
+ //trim overly big lists
+ profilingCorrelationStackTraceIds.trimToSize();
+ } else {
+ profilingCorrelationStackTraceIds.clear();
+ }
+ }
+
@Override
public boolean isNoop() {
return noop;
@@ -552,4 +569,19 @@ public Throwable getPendingTransactionException() {
return this.pendingException;
}
+ public void addProfilerCorrelationStackTrace(Id idToCopy) {
+ Id id = tracer.createProfilingCorrelationStackTraceId();
+ id.copyFrom(idToCopy);
+ synchronized (profilingCorrelationStackTraceIds) {
+ this.profilingCorrelationStackTraceIds.add(id);
+ }
+ }
+
+ /**
+ * Returns the list of stacktrace-IDs from the profiler associated with this transaction
+ * To protect agains concurrent modifications, consumers must synchronize on the returned list.
+ */
+ public List getProfilingCorrelationStackTraceIds() {
+ return profilingCorrelationStackTraceIds;
+ }
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtils.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtils.java
new file mode 100644
index 0000000000..aea9fde5bc
--- /dev/null
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtils.java
@@ -0,0 +1,43 @@
+package co.elastic.apm.agent.report.serialize;
+
+import com.dslplatform.json.JsonWriter;
+
+public class Base64SerializationUtils {
+
+ private static final byte[] BASE64_URL_CHARS = new byte[]{
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+ 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+ 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3',
+ '4', '5', '6', '7', '8', '9', '-', '_',
+ };
+
+
+ public static void writeBytesAsBase64UrlSafe(byte[] data, JsonWriter jw) {
+ int i = 0;
+ for (; i + 2 < data.length; i += 3) {
+ int b0 = ((int) data[i]) & 0xFF;
+ int b1 = ((int) data[i + 1]) & 0xFF;
+ int b2 = ((int) data[i + 2]) & 0xFF;
+ jw.writeByte(BASE64_URL_CHARS[b0 >> 2]);
+ jw.writeByte(BASE64_URL_CHARS[((b0 << 4) & 63) | (b1 >> 4)]);
+ jw.writeByte(BASE64_URL_CHARS[((b1 << 2) & 63) | (b2 >> 6)]);
+ jw.writeByte(BASE64_URL_CHARS[b2 & 63]);
+ }
+ int leftOver = data.length - i;
+ if (leftOver == 1) {
+ int b0 = ((int) data[i]) & 0xFF;
+ jw.writeByte(BASE64_URL_CHARS[b0 >> 2]);
+ jw.writeByte(BASE64_URL_CHARS[(b0 << 4) & 63]);
+ } else if (leftOver == 2) {
+ int b0 = ((int) data[i]) & 0xFF;
+ int b1 = ((int) data[i + 1]) & 0xFF;
+ jw.writeByte(BASE64_URL_CHARS[b0 >> 2]);
+ jw.writeByte(BASE64_URL_CHARS[((b0 << 4) & 63) | (b1 >> 4)]);
+ jw.writeByte(BASE64_URL_CHARS[(b1 << 2) & 63]);
+ }
+ }
+}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
index e56bb1b1e3..a14b296bb3 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java
@@ -82,6 +82,7 @@
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -1050,10 +1051,22 @@ private void serializeSpanLinks(List spanLinks) {
}
}
- private void serializeOTel(AbstractSpan> span) {
+ private void serializeOTel(Span span) {
+ serializeOtel(span, Collections.emptyList());
+ }
+
+ private void serializeOTel(Transaction transaction) {
+ List profilingCorrelationStackTraceIds = transaction.getProfilingCorrelationStackTraceIds();
+ synchronized (profilingCorrelationStackTraceIds) {
+ serializeOtel(transaction, profilingCorrelationStackTraceIds);
+ }
+ }
+
+ private void serializeOtel(AbstractSpan> span, List profilingStackTraceIds) {
OTelSpanKind kind = span.getOtelKind();
Map attributes = span.getOtelAttributes();
- boolean hasAttributes = !attributes.isEmpty();
+
+ boolean hasAttributes = !attributes.isEmpty() || !profilingStackTraceIds.isEmpty();
boolean hasKind = kind != null;
if (hasKind || hasAttributes) {
writeFieldName("otel");
@@ -1070,11 +1083,13 @@ private void serializeOTel(AbstractSpan> span) {
}
writeFieldName("attributes");
jw.writeByte(OBJECT_START);
- int index = 0;
+ boolean isFirstAttrib = true;
for (Map.Entry entry : attributes.entrySet()) {
- if (index++ > 0) {
+ if (!isFirstAttrib) {
jw.writeByte(COMMA);
}
+ isFirstAttrib = false;
+
writeFieldName(entry.getKey());
Object o = entry.getValue();
if (o instanceof Number) {
@@ -1085,6 +1100,22 @@ private void serializeOTel(AbstractSpan> span) {
BoolConverter.serialize((Boolean) o, jw);
}
}
+ if (!profilingStackTraceIds.isEmpty()) {
+ if (!isFirstAttrib) {
+ jw.writeByte(COMMA);
+ }
+ writeFieldName("elastic.profiler_stack_trace_ids");
+ jw.writeByte(ARRAY_START);
+ for (int i = 0; i < profilingStackTraceIds.size(); i++) {
+ if (i != 0) {
+ jw.writeByte(COMMA);
+ }
+ jw.writeByte(QUOTE);
+ profilingStackTraceIds.get(i).writeAsBase64UrlSafe(jw);
+ jw.writeByte(QUOTE);
+ }
+ jw.writeByte(ARRAY_END);
+ }
jw.writeByte(OBJECT_END);
}
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtilTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtilTest.java
new file mode 100644
index 0000000000..257d6fba96
--- /dev/null
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/Base64SerializationUtilTest.java
@@ -0,0 +1,41 @@
+package co.elastic.apm.agent.report.serialize;
+
+import com.dslplatform.json.DslJson;
+import com.dslplatform.json.JsonWriter;
+import org.junit.jupiter.api.Test;
+
+import java.util.Base64;
+import java.util.Random;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+
+public class Base64SerializationUtilTest {
+
+ @Test
+ public void empty() {
+ JsonWriter jw = new DslJson<>(new DslJson.Settings<>()).newWriter();
+ Base64SerializationUtils.writeBytesAsBase64UrlSafe(new byte[0], jw);
+ assertThat(jw.size()).isEqualTo(0);
+ }
+
+ @Test
+ public void randomInputs() {
+ DslJson dslJson = new DslJson<>(new DslJson.Settings<>());
+
+ Base64.Encoder reference = Base64.getUrlEncoder().withoutPadding();
+
+ Random rnd = new Random(42);
+ for (int i = 0; i < 100_000; i++) {
+ int len = rnd.nextInt(31) + 1;
+ byte[] data = new byte[len];
+ rnd.nextBytes(data);
+
+ String expectedResult = reference.encodeToString(data);
+
+ JsonWriter jw = dslJson.newWriter();
+ Base64SerializationUtils.writeBytesAsBase64UrlSafe(data, jw);
+
+ assertThat(jw.toString()).isEqualTo(expectedResult);
+ }
+ }
+}
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/DslJsonSerializerTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/DslJsonSerializerTest.java
index 86def7f803..8f341fd835 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/DslJsonSerializerTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/DslJsonSerializerTest.java
@@ -1584,6 +1584,31 @@ void testSpanLinksSerialization() {
assertThat(parent2link.get("span_id").textValue()).isEqualTo(parent2.getTraceContext().getId().toString());
}
+ private static Id create128BitId(String id) {
+ Id idObj = Id.new128BitId();
+ idObj.fromHexString(id, 0);
+ return idObj;
+ }
+
+ @Test
+ void testProfilingStackTraceIdSerialization() {
+ Transaction transaction = tracer.startRootTransaction(null);
+
+ transaction.addProfilerCorrelationStackTrace(create128BitId("a1a2a3a4a5a6a7a8b1b2b3b4b5b6b7b8"));
+ transaction.addProfilerCorrelationStackTrace(create128BitId("c1c2c3c4c5c6c7c8d1d2d3d4d5d6d7d8"));
+
+ JsonNode transactionJson = readJsonString(writer.toJsonString(transaction));
+ JsonNode otel = transactionJson.get("otel");
+ assertThat(otel).isNotNull();
+ JsonNode attributes = otel.get("attributes");
+ assertThat(attributes).isNotNull();
+ JsonNode ids = attributes.get("elastic.profiler_stack_trace_ids");
+ assertThat(ids.isArray()).isTrue();
+ assertThat(ids.size()).isEqualTo(2);
+ assertThat(ids.get(0).asText()).isEqualTo("oaKjpKWmp6ixsrO0tba3uA");
+ assertThat(ids.get(1).asText()).isEqualTo("wcLDxMXGx8jR0tPU1dbX2A");
+ }
+
@ParameterizedTest
@ValueSource(booleans = {true, false})
void testSerializeLog(boolean asString) {
From ef28020102ccceaed8313995b8d4ff81044e62d5 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Fri, 3 May 2024 14:53:50 +0200
Subject: [PATCH 045/132] release: use explicit container arch (#3611)
---
scripts/docker-release/build_docker.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/docker-release/build_docker.sh b/scripts/docker-release/build_docker.sh
index 26268f279d..6b6b3554da 100755
--- a/scripts/docker-release/build_docker.sh
+++ b/scripts/docker-release/build_docker.sh
@@ -40,6 +40,7 @@ fi
echo "INFO: Starting Docker build for version $RELEASE_VERSION"
docker build -t docker.elastic.co/$NAMESPACE/apm-agent-java:$RELEASE_VERSION \
+ --platform linux/amd64 \
--build-arg JAR_FILE=apm-agent-java.jar \
--build-arg HANDLER_FILE=apm-agent-lambda-layer/src/main/assembly/elastic-apm-handler .
From bdd56989ac685e4e936d4917cdcbfa0d56102f62 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 3 May 2024 16:42:09 +0100
Subject: [PATCH 046/132] Bump version.aws.sdk from 2.25.21 to 2.25.43 in
/apm-agent-plugins (#3614)
Bumps `version.aws.sdk` from 2.25.21 to 2.25.43.
Updates `software.amazon.awssdk:s3` from 2.25.21 to 2.25.43
Updates `software.amazon.awssdk:sqs` from 2.25.21 to 2.25.43
Updates `software.amazon.awssdk:dynamodb` from 2.25.21 to 2.25.43
---
updated-dependencies:
- dependency-name: software.amazon.awssdk:s3
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:sqs
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:dynamodb
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 e99b777283..bc3726ff18 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
@@ -13,7 +13,7 @@
${project.basedir}/../../..
- 2.25.21
+ 2.25.43
2.0.0
8
From bf4b4deff3f73e6631e3dd147b59d056a5550525 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Fri, 3 May 2024 18:18:38 +0200
Subject: [PATCH 047/132] Add thread dump debug option (#3589)
* add thread dump option
---
.../configuration/CoreConfiguration.java | 11 +++
.../co/elastic/apm/agent/util/ThreadDump.java | 85 +++++++++++++++++++
...elastic.apm.agent.tracer.LifecycleListener | 1 +
3 files changed, 97 insertions(+)
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/util/ThreadDump.java
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
index 36d8c42b85..b84f4bd172 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
@@ -488,6 +488,13 @@ public String toString(Collection value) {
"exist and use it to dump bytecode of instrumented classes.")
.buildWithDefault("");
+ private final ConfigurationOption threadDumpInterval = TimeDurationValueConverter.durationOption("ms")
+ .key("thread_dump_interval")
+ .configurationCategory(CORE_CATEGORY)
+ .tags("internal")
+ .description("Triggers a thread dump at regular frequency, should be used to help configure trace_methods without knowledge of application code")
+ .buildWithDefault(TimeDuration.of("0ms"));
+
private final ConfigurationOption typeMatchingWithNamePreFilter = ConfigurationOption.booleanOption()
.key("enable_type_matching_name_pre_filtering")
.configurationCategory(CORE_CATEGORY)
@@ -1017,6 +1024,10 @@ public String getBytecodeDumpPath() {
return bytecodeDumpPath.get();
}
+ public long getThreadDumpInterval() {
+ return threadDumpInterval.get().getMillis();
+ }
+
public boolean isTypeMatchingWithNamePreFilter() {
return typeMatchingWithNamePreFilter.get();
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/util/ThreadDump.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/util/ThreadDump.java
new file mode 100644
index 0000000000..3bd7d11784
--- /dev/null
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/util/ThreadDump.java
@@ -0,0 +1,85 @@
+/*
+ * 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 co.elastic.apm.agent.configuration.CoreConfiguration;
+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 javax.annotation.Nullable;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+public class ThreadDump extends AbstractLifecycleListener {
+
+ private Logger log = LoggerFactory.getLogger(ThreadDump.class);
+
+ @Nullable
+ private ScheduledThreadPoolExecutor executor;
+
+ @Override
+ public void start(Tracer tracer) throws Exception {
+
+ long threadDumpInterval = tracer.getConfig(CoreConfiguration.class).getThreadDumpInterval();
+ if (threadDumpInterval <= 0) {
+ return;
+ }
+
+ if (!log.isDebugEnabled()) {
+ log.error("thread dump option requires debug log level");
+ return;
+ }
+
+ if (threadDumpInterval < 100) {
+ log.error("thread dump frequency too high, adjusted to every 100ms");
+ threadDumpInterval = 100;
+ }
+
+ log.warn("thread dump will be generated every %s ms", threadDumpInterval);
+
+ executor = ExecutorUtils.createSingleThreadSchedulingDaemonPool("thread-dump");
+
+ executor.scheduleAtFixedRate(new Runnable() {
+ @Override
+ public void run() {
+ ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
+ StringBuilder sb = new StringBuilder();
+ for (ThreadInfo threadInfo : threadMXBean.dumpAllThreads(true, true)) {
+ sb.append(threadInfo.toString());
+ }
+
+ log.debug("thread dump: \n\n {}", sb);
+
+ }
+ }, threadDumpInterval, threadDumpInterval, TimeUnit.MILLISECONDS);
+ }
+
+ @Override
+ public void stop() throws Exception {
+ if (executor == null) {
+ return;
+ }
+ ExecutorUtils.shutdownAndWaitTermination(executor);
+ }
+}
diff --git a/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener b/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
index fb1f5e9680..4425ab21a6 100644
--- a/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
+++ b/apm-agent-core/src/main/resources/META-INF/services/co.elastic.apm.agent.tracer.LifecycleListener
@@ -10,3 +10,4 @@ co.elastic.apm.agent.metrics.builtin.AgentOverheadMetrics
co.elastic.apm.agent.impl.circuitbreaker.CircuitBreaker
co.elastic.apm.agent.collections.WeakMapCleaner
co.elastic.apm.agent.report.serialize.MetricRegistryReporter
+co.elastic.apm.agent.util.ThreadDump
From 90277e23cd597c10c283b5e5d3f17da98475806b Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Mon, 6 May 2024 09:29:04 +0200
Subject: [PATCH 048/132] Universal profiling integration: Add stacktrace-IDs
to transactions (#3615)
---
CHANGELOG.asciidoc | 4 +
apm-agent-core/pom.xml | 2 +-
.../UniversalProfilingConfiguration.java | 14 +-
.../apm/agent/impl/ElasticApmTracer.java | 4 +
.../serialize/Base64SerializationUtils.java | 18 ++
.../apm/agent/universalprofiling/Clock.java | 31 +++
.../universalprofiling/MoveableEvent.java | 30 +++
.../universalprofiling/PeekingPoller.java | 90 ++++++++
.../SpanProfilingSamplesCorrelator.java | 218 ++++++++++++++++++
.../UniversalProfilingIntegration.java | 51 +++-
.../Base64SerializationUtilTest.java | 18 ++
.../universalprofiling/PeekingPollerTest.java | 130 +++++++++++
.../UniversalProfilingIntegrationTest.java | 186 ++++++++++++++-
docs/configuration.asciidoc | 100 ++++++++
14 files changed, 871 insertions(+), 25 deletions(-)
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/Clock.java
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/MoveableEvent.java
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/PeekingPoller.java
create mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/universalprofiling/SpanProfilingSamplesCorrelator.java
create mode 100644 apm-agent-core/src/test/java/co/elastic/apm/agent/universalprofiling/PeekingPollerTest.java
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0cdeb84dbe..4523676a8c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
+[float]
+===== Features
+* Added support for correlating APM data with elastic universal profiling data - {pull}3615[#3615], {pull}3602[#3602], {pull}3607[#3607], {pull}3598[#3598]
+
[float]
===== Bug fixes
* Fixed edge case where inferred spans could cause cycles in the trace parent-child relationships, subsequently resulting in the UI crashing - {pull}3588[#3588]
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index 5f35f7912d..b542555929 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -103,7 +103,7 @@
co.elastic.otel
jvmti-access
- 0.3.0
+ 0.3.1
org.springframework.boot
spring-boot-dependencies
- 3.2.4
+ 3.2.5
pom
import
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index 2f10a4cba4..7b6889d8c0 100644
--- a/apm-agent-plugins/apm-spring-webflux/pom.xml
+++ b/apm-agent-plugins/apm-spring-webflux/pom.xml
@@ -18,7 +18,7 @@
2.7.16
- 3.2.4
+ 3.2.5
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 78a4d0c7c6..0d77989efa 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
@@ -22,7 +22,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.4
+ 3.2.5
pom
import
diff --git a/apm-agent-plugins/apm-spring-webmvc/pom.xml b/apm-agent-plugins/apm-spring-webmvc/pom.xml
index 9e9c73d10b..ac610a3e59 100644
--- a/apm-agent-plugins/apm-spring-webmvc/pom.xml
+++ b/apm-agent-plugins/apm-spring-webmvc/pom.xml
@@ -29,7 +29,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.4
+ 3.2.5
pom
import
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index b744abc7c6..b1d70a0c6f 100644
--- a/integration-tests/spring-boot-3/pom.xml
+++ b/integration-tests/spring-boot-3/pom.xml
@@ -30,7 +30,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.4
+ 3.2.5
pom
import
From e342714cd36c319e329e2942c127ed667d185bd5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 May 2024 13:55:01 +0100
Subject: [PATCH 052/132] Bump org.jctools:jctools-core from 4.0.1 to 4.0.3
(#3618)
* Bump org.jctools:jctools-core from 4.0.1 to 4.0.3
Bumps [org.jctools:jctools-core](https://github.com/JCTools/JCTools) from 4.0.1 to 4.0.3.
- [Release notes](https://github.com/JCTools/JCTools/releases)
- [Changelog](https://github.com/JCTools/JCTools/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/JCTools/JCTools/compare/v4.0.1...v4.0.3)
---
updated-dependencies:
- dependency-name: org.jctools:jctools-core
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* remove comment
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
apm-agent-core/pom.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index b542555929..984a63cc68 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -56,8 +56,7 @@
org.jctools
jctools-core
-
- 4.0.1
+ 4.0.3
com.googlecode.concurrentlinkedhashmap
From 1524ba64e1ef9a409bc17001710607b2c711e935 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 May 2024 19:51:12 +0100
Subject: [PATCH 053/132] Bump version.mockito from 5.11.0 to 5.12.0 (#3629)
Bumps `version.mockito` from 5.11.0 to 5.12.0.
Updates `org.mockito:mockito-core` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)
Updates `org.mockito:mockito-subclass` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-subclass
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 05f3193f6d..84013df348 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
9.6
5.4.0
- 5.11.0
+ 5.12.0
1.17
From 172846e0492c3eb2e204e08dafa295ff752f6f95 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 May 2024 09:22:27 +0200
Subject: [PATCH 054/132] Bump com.networknt:json-schema-validator from 1.3.3
to 1.4.0 (#3628)
Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.3.3...1.4.0)
---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 84013df348..60cb38e650 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,7 +129,7 @@
1.6.0
5.0.15.RELEASE
9.4.11.v20180605
- 1.3.3
+ 1.4.0
1.14.14
9.6
From 23397f9a2bd6f680adfe274ec3a4f2f06cff2590 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Tue, 14 May 2024 17:47:31 +0200
Subject: [PATCH 055/132] github-action: delete opentelemetry workflow (#3630)
---
.github/workflows/opentelemetry.yml | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 .github/workflows/opentelemetry.yml
diff --git a/.github/workflows/opentelemetry.yml b/.github/workflows/opentelemetry.yml
deleted file mode 100644
index 16d0101ed5..0000000000
--- a/.github/workflows/opentelemetry.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Look up results at https://ela.st/oblt-ci-cd-stats
-# There will be one service per GitHub repository, including the org name, and one Transaction per Workflow.
-name: OpenTelemetry Export Trace
-
-on:
- workflow_run:
- workflows: [ "*" ]
- types: [completed]
-
-permissions:
- contents: read
-
-jobs:
- otel-export-trace:
- runs-on: ubuntu-latest
- steps:
- - uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current
- with:
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
From 28665501007b24c35169becb45cb2a348c0b66fa Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Tue, 14 May 2024 21:33:36 +0200
Subject: [PATCH 056/132] buildkite: avoid failing in tear-down failed (#3622)
---
.ci/release.sh | 2 +-
.ci/snapshot.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.ci/release.sh b/.ci/release.sh
index 2f7c4bd832..fdba0d05be 100755
--- a/.ci/release.sh
+++ b/.ci/release.sh
@@ -10,7 +10,7 @@ set -eo pipefail
clean_up () {
ARG=$?
echo "--- Deleting tmp workspace"
- rm -rf $TMP_WORKSPACE
+ rm -rf $TMP_WORKSPACE || true
exit $ARG
}
trap clean_up EXIT
diff --git a/.ci/snapshot.sh b/.ci/snapshot.sh
index 5fa49b94a6..135c723753 100755
--- a/.ci/snapshot.sh
+++ b/.ci/snapshot.sh
@@ -12,7 +12,7 @@ set -eo pipefail
clean_up () {
ARG=$?
echo "--- Deleting tmp workspace"
- rm -rf $TMP_WORKSPACE
+ rm -rf $TMP_WORKSPACE || true
exit $ARG
}
trap clean_up EXIT
From ad3c21c5f022bb2448aa9c0f8e3afd09a7c141ad Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Wed, 15 May 2024 09:51:22 +0200
Subject: [PATCH 057/132] github-action: use actions/attest-build-provenance
(#3631)
---
.github/workflows/release.yml | 2 +-
.github/workflows/snapshot.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c2c2a64b31..332c24b8f4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -106,7 +106,7 @@ jobs:
run: tar xvf ${{ env.TARBALL_FILE }}
- name: generate build provenance
- uses: github-early-access/generate-build-provenance@main
+ uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
with:
subject-path: "${{ github.workspace }}/**/target/*.jar"
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index f985425da2..ca4d21a52f 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -71,7 +71,7 @@ jobs:
run: tar xvf ${{ env.TARBALL_FILE }}
- name: generate build provenance
- uses: github-early-access/generate-build-provenance@main
+ uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
with:
subject-path: "${{ github.workspace }}/**/target/*.jar"
From a2840eb99a4113fa09115960499cf1d6027bc506 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Wed, 15 May 2024 16:10:17 +0200
Subject: [PATCH 058/132] Clarify rabbitmq naming mode support (#3633)
---
.../agent/tracer/configuration/MessagingConfiguration.java | 4 +++-
docs/configuration.asciidoc | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
index 08eb2fb623..85420bc1b2 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
@@ -111,7 +111,9 @@ public class MessagingConfiguration extends ConfigurationOptionProvider {
private final ConfigurationOption rabbitMQNamingMode = ConfigurationOption.enumOption(RabbitMQNamingMode.class)
.key("rabbitmq_naming_mode")
.configurationCategory(MESSAGING_CATEGORY)
- .description("Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`")
+ .description("Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.\n" +
+ "Note that `QUEUE` only works when using RabbitMQ via spring-amqp."
+ )
.dynamic(true)
.tags("added[1.46.0]")
.buildWithDefault(RabbitMQNamingMode.EXCHANGE);
diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc
index 1b3bd263bd..1a31360d3f 100644
--- a/docs/configuration.asciidoc
+++ b/docs/configuration.asciidoc
@@ -2513,7 +2513,8 @@ Starting from version 1.43.0, the classes that are part of the 'application_pack
[[config-rabbitmq-naming-mode]]
==== `rabbitmq_naming_mode` (added[1.46.0])
-Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`
+Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.
+Note that `QUEUE` only works when using RabbitMQ via spring-amqp.
<>
@@ -4702,7 +4703,8 @@ Example: `5ms`.
#
# jms_listener_packages=
-# Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`
+# Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.
+# Note that `QUEUE` only works when using RabbitMQ via spring-amqp.
#
# Valid options: EXCHANGE, QUEUE
# This setting can be changed at runtime
From 22f21665414eab9cb2aad8da178f472261ec1b38 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 16 May 2024 12:44:26 +0200
Subject: [PATCH 059/132] ci: build and push Docker image based on Chainguard
base image (#3623)
---
.github/workflows/snapshot.yml | 33 ++++++++++++++++++++++-
CONTRIBUTING.md | 8 +++++-
Dockerfile.wolfi | 7 +++++
scripts/docker-release/build_docker.sh | 36 ++++++++++++++++----------
scripts/docker-release/push_docker.sh | 3 +++
5 files changed, 72 insertions(+), 15 deletions(-)
create mode 100644 Dockerfile.wolfi
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index ca4d21a52f..ed7def7f9e 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -75,7 +75,38 @@ jobs:
with:
subject-path: "${{ github.workspace }}/**/target/*.jar"
- - if: ${{ failure() }}
+ build-docker-images:
+ name: "Build docker images"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
+ with:
+ registry: docker.elastic.co
+ secret: secret/apm-team/ci/docker-registry/prod
+ url: ${{ secrets.VAULT_ADDR }}
+ roleId: ${{ secrets.VAULT_ROLE_ID }}
+ secretId: ${{ secrets.VAULT_SECRET_ID }}
+ - name: prepare context for testing docker build
+ run: |
+ mkdir -p elastic-apm-agent/target
+ curl -L -s -o elastic-apm-agent/target/elastic-apm-agent-1.49.0.jar \
+ "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=co.elastic.apm&a=elastic-apm-agent&v=1.49.0"
+ - name: "Build docker image"
+ run: ./scripts/docker-release/build_docker.sh "test"
+
+ notify:
+ needs:
+ - build-docker-images
+ - deploy
+ - validate
+ runs-on: ubuntu-latest
+ steps:
+ - id: check
+ uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
+ with:
+ needs: ${{ toJSON(needs) }}
+ - if: ${{ failure() && ! inputs.dry_run }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2a5689fa04..0757c17d93 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -330,8 +330,14 @@ docker.elastic.co and are located in the `observability` namespace.
For example, to download the v1.12.0 of the agent, use the following:
+```bash
+docker pull docker.elastic.co/observability/apm-agent-java:1.12.0
```
-docker pull docker.elastic.co/observability/apm-agent-java:1.12.0
+
+In addition, you can use the `wolfi` version by adding the suffix `-wolfi`
+
+```bash
+docker pull docker.elastic.co/observability/apm-agent-java:1.12.0-wolfi
```
#### Creating images for a Release
diff --git a/Dockerfile.wolfi b/Dockerfile.wolfi
new file mode 100644
index 0000000000..9770c50ea1
--- /dev/null
+++ b/Dockerfile.wolfi
@@ -0,0 +1,7 @@
+FROM docker.elastic.co/wolfi/chainguard-base@sha256:9f940409f96296ef56140bcc4665c204dd499af4c32c96cc00e792558097c3f1
+RUN mkdir /usr/agent
+ARG JAR_FILE
+ARG HANDLER_FILE
+COPY ${JAR_FILE} /usr/agent/elastic-apm-agent.jar
+COPY ${HANDLER_FILE} /usr/agent/elastic-apm-handler
+RUN chmod +x /usr/agent/elastic-apm-handler
diff --git a/scripts/docker-release/build_docker.sh b/scripts/docker-release/build_docker.sh
index 6b6b3554da..39dcab2391 100755
--- a/scripts/docker-release/build_docker.sh
+++ b/scripts/docker-release/build_docker.sh
@@ -18,11 +18,13 @@ readonly SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
readonly PROJECT_ROOT=$SCRIPT_PATH/../../
readonly NAMESPACE="observability"
-if [ "$(ls -A ${PROJECT_ROOT}elastic-apm-agent/target/*.jar)" ]
+FILE=$(ls -A ${PROJECT_ROOT}elastic-apm-agent/target/*.jar | grep -E "elastic-apm-agent-[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?.jar" )
+
+if [ -n "${FILE}" ]
then
# We have build files to use
echo "INFO: Found local build artifact. Using locally built for Docker build"
- find -E ${PROJECT_ROOT}elastic-apm-agent/target -regex '.*/elastic-apm-agent-[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?.jar' -exec cp {} ${PROJECT_ROOT}apm-agent-java.jar \; || echo "INFO: No locally built image found"
+ cp "${FILE}" "${PROJECT_ROOT}apm-agent-java.jar" || echo "INFO: No locally built image found"
elif [ ! -z ${SONATYPE_FALLBACK+x} ]
then
echo "INFO: No local build artifact and SONATYPE_FALLBACK. Falling back to downloading artifact from Sonatype Nexus repository for version $RELEASE_VERSION"
@@ -37,19 +39,27 @@ then
exit 1
fi
-echo "INFO: Starting Docker build for version $RELEASE_VERSION"
+ls -l apm-agent-java.jar
-docker build -t docker.elastic.co/$NAMESPACE/apm-agent-java:$RELEASE_VERSION \
- --platform linux/amd64 \
- --build-arg JAR_FILE=apm-agent-java.jar \
- --build-arg HANDLER_FILE=apm-agent-lambda-layer/src/main/assembly/elastic-apm-handler .
+echo "INFO: Starting Docker build for version $RELEASE_VERSION"
+for DOCKERFILE in "Dockerfile" "Dockerfile.wolfi" ; do
+ DOCKER_TAG=$RELEASE_VERSION
+ if [[ $DOCKERFILE =~ "wolfi" ]]; then
+ DOCKER_TAG="${RELEASE_VERSION}-wolfi"
+ fi
+ docker build -t docker.elastic.co/$NAMESPACE/apm-agent-java:$DOCKER_TAG \
+ --platform linux/amd64 \
+ --build-arg JAR_FILE=apm-agent-java.jar \
+ --build-arg HANDLER_FILE=apm-agent-lambda-layer/src/main/assembly/elastic-apm-handler \
+ --file $DOCKERFILE .
-if [ $? -eq 0 ]
-then
- echo "INFO: Docker image built successfully"
-else
- echo "ERROR: Problem building Docker image!"
-fi
+ if [ $? -eq 0 ]
+ then
+ echo "INFO: Docker image built successfully"
+ else
+ echo "ERROR: Problem building Docker image!"
+ fi
+done
function finish {
diff --git a/scripts/docker-release/push_docker.sh b/scripts/docker-release/push_docker.sh
index b30fd7e5ad..b6fc1ae1bf 100755
--- a/scripts/docker-release/push_docker.sh
+++ b/scripts/docker-release/push_docker.sh
@@ -32,6 +32,7 @@ readonly DOCKER_PUSH_IMAGE_LATEST="$DOCKER_REGISTRY_URL/$DOCKER_IMAGE_NAME:lates
echo "INFO: Pushing image $DOCKER_PUSH_IMAGE to $DOCKER_REGISTRY_URL"
docker push $DOCKER_PUSH_IMAGE || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; }
+docker push "${DOCKER_PUSH_IMAGE}-wolfi" || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; }
readonly LATEST_TAG=$(git tag --list --sort=version:refname "v*" | grep -v RC | sed s/^v// | tail -n 1)
@@ -40,4 +41,6 @@ then
echo "INFO: Current version ($RELEASE_VERSION) is the latest version. Tagging and pushing $DOCKER_PUSH_IMAGE_LATEST ..."
docker tag $DOCKER_PUSH_IMAGE $DOCKER_PUSH_IMAGE_LATEST
docker push $DOCKER_PUSH_IMAGE_LATEST || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; }
+ docker tag "${DOCKER_PUSH_IMAGE}-wolfi" "${DOCKER_PUSH_IMAGE_LATEST}-wolfi"
+ docker push "${DOCKER_PUSH_IMAGE_LATEST}-wolfi" || { echo "You may need to run 'docker login' first and then re-run this script"; exit 1; }
fi
From ea685113257279c820dc4b97d288486fb7cbe76d Mon Sep 17 00:00:00 2001
From: jackshirazi
Date: Thu, 16 May 2024 13:40:52 +0100
Subject: [PATCH 060/132] bouncy castle upgrade (#3634)
---
apm-agent-attach-cli/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apm-agent-attach-cli/pom.xml b/apm-agent-attach-cli/pom.xml
index babd6a2e0c..c5dea23c4f 100644
--- a/apm-agent-attach-cli/pom.xml
+++ b/apm-agent-attach-cli/pom.xml
@@ -19,8 +19,8 @@
${project.basedir}/..
- 1.0.5.1
- 1.0.2.1
+ 1.0.7.1
+ 1.0.2.5
From b7b62297eadc3fae8ef4e3e243e4b043f2476d98 Mon Sep 17 00:00:00 2001
From: jackshirazi
Date: Fri, 17 May 2024 15:36:42 +0100
Subject: [PATCH 061/132] add symlink in dockerfile for /javaagent.jar for otel
operator to find (#3635)
* add symlink in dockerfile for /javaagent.jar for otel operator to find
* and wolfi too
---
Dockerfile | 1 +
Dockerfile.wolfi | 1 +
2 files changed, 2 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index 847b473b35..0fa5d3f094 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,3 +8,4 @@ ARG HANDLER_FILE
COPY ${JAR_FILE} /usr/agent/elastic-apm-agent.jar
COPY ${HANDLER_FILE} /usr/agent/elastic-apm-handler
RUN chmod +x /usr/agent/elastic-apm-handler
+RUN ln -s /usr/agent/elastic-apm-agent.jar /javaagent.jar
diff --git a/Dockerfile.wolfi b/Dockerfile.wolfi
index 9770c50ea1..df2ecfc4eb 100644
--- a/Dockerfile.wolfi
+++ b/Dockerfile.wolfi
@@ -5,3 +5,4 @@ ARG HANDLER_FILE
COPY ${JAR_FILE} /usr/agent/elastic-apm-agent.jar
COPY ${HANDLER_FILE} /usr/agent/elastic-apm-handler
RUN chmod +x /usr/agent/elastic-apm-handler
+RUN ln -s /usr/agent/elastic-apm-agent.jar /javaagent.jar
From 026cc5ea176025ab687bfa1d3c369d52e105b5b3 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Mon, 20 May 2024 15:36:06 +0200
Subject: [PATCH 062/132] buildkite: support version 21 for opentelemetry
(#3621)
---
.buildkite/hooks/pre-command | 10 +++++++---
.buildkite/hooks/prepare-common.sh | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command
index 5b42228ea6..b8d23cd6fa 100755
--- a/.buildkite/hooks/pre-command
+++ b/.buildkite/hooks/pre-command
@@ -14,8 +14,15 @@ if [[ "$BUILDKITE_COMMAND" =~ .*"upload".* ]]; then
exit 0
fi
+# Run always
+source .buildkite/hooks/prepare-common.sh
+
if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-opentelemetry-benchmark" ]; then
source .buildkite/hooks/prepare-benchmark.sh
+ # NOTE: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/11323 might
+ # support .java-version, if so then it might be worthy to read the file.
+ JAVA_VERSION=21
+ source .buildkite/hooks/prepare-common.sh
fi
if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-snapshot" ]; then
@@ -25,6 +32,3 @@ fi
if [ "$BUILDKITE_PIPELINE_SLUG" == "apm-agent-java-release" ]; then
source .buildkite/hooks/prepare-release.sh
fi
-
-# Run always
-source .buildkite/hooks/prepare-common.sh
diff --git a/.buildkite/hooks/prepare-common.sh b/.buildkite/hooks/prepare-common.sh
index 7c04356ecf..7697908c6f 100644
--- a/.buildkite/hooks/prepare-common.sh
+++ b/.buildkite/hooks/prepare-common.sh
@@ -2,7 +2,9 @@
set -eo pipefail
# Configure the java version
-JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
+if [ -z "$JAVA_VERSION" ] ; then
+ JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]')
+fi
set +u
# In case the HOME is not available in the context of the runner.
if [ -z "${HOME}" ] ; then
From b7cac10364f306b6131d0074c3f8666ea236125c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 21 May 2024 12:19:59 +0200
Subject: [PATCH 063/132] Bump version.testcontainers from 1.19.1 to 1.19.8
(#3641)
Bumps `version.testcontainers` from 1.19.1 to 1.19.8.
Updates `org.testcontainers:testcontainers-bom` from 1.19.1 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.1...1.19.8)
Updates `org.testcontainers:testcontainers` from 1.19.1 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.1...1.19.8)
---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers-bom
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: org.testcontainers:testcontainers
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 60cb38e650..0066e0d189 100644
--- a/pom.xml
+++ b/pom.xml
@@ -140,7 +140,7 @@
1.17
- 1.19.1
+ 1.19.8
2.38.0
From a65bf2e297b372e45b0a6f898464f8a52485c0df Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Tue, 21 May 2024 14:06:26 +0200
Subject: [PATCH 064/132] ci: add some job timeouts (#3638)
---
.github/workflows/main.yml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0d5944b6e3..d69d0d610e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -63,6 +63,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
+ timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/maven-goal
@@ -128,6 +129,7 @@ jobs:
name: License
runs-on: ubuntu-latest
needs: build
+ timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/unstash
@@ -148,6 +150,7 @@ jobs:
# When undefined, we need to emulate the default value
if: inputs.test_ci == true || inputs.test_ci == null
runs-on: ubuntu-latest
+ timeout-minutes: 30
needs: build
steps:
- uses: actions/checkout@v4
@@ -169,6 +172,7 @@ jobs:
non-app-server-integration-tests:
name: Non-Application Server integration tests
+ timeout-minutes: 60
if: |
contains(github.event.pull_request.labels.*.name, 'ci:agent-integration')
|| github.event.pull_request.draft == false
@@ -207,6 +211,7 @@ jobs:
app-server-integration-tests:
name: Application Server integration tests
+ timeout-minutes: 60
if: |
contains(github.event.pull_request.labels.*.name, 'ci:agent-integration')
|| github.event.pull_request.draft == false
@@ -248,6 +253,7 @@ jobs:
name: Javadoc
runs-on: ubuntu-latest
needs: build
+ timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/unstash
@@ -260,6 +266,7 @@ jobs:
unit-tests-windows:
name: Build & Test Windows
+ timeout-minutes: 60
# Inputs aren't defined on some events
# When undefined, we need to emulate the default value
if: |
@@ -287,6 +294,7 @@ jobs:
jdk-compatibility-tests:
name: JDK Compatibility Tests
+ timeout-minutes: 60
if: |
contains(github.event.pull_request.labels.*.name, 'ci:jdk-compatibility')
|| inputs.jdk_compatibility_ci == true
@@ -324,6 +332,7 @@ jobs:
jboss:
name: JBoss integration tests
runs-on: ubuntu-latest
+ timeout-minutes: 30
needs: build
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor
if: github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' )
From a28d9786f93e1e446ffe3d5d155d5b127eb81881 Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Wed, 22 May 2024 09:50:54 +0200
Subject: [PATCH 065/132] Fix too small activation stack for low
transaction_max_spans values (#3643)
---
CHANGELOG.asciidoc | 1 +
.../apm/agent/impl/ElasticApmTracer.java | 8 +-
.../apm/agent/impl/ElasticApmTracerTest.java | 91 ++++++++++++-------
3 files changed, 67 insertions(+), 33 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 4523676a8c..feeb63febf 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -39,6 +39,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
===== Bug fixes
* Fixed edge case where inferred spans could cause cycles in the trace parent-child relationships, subsequently resulting in the UI crashing - {pull}3588[#3588]
* Fix NPE in dropped spans statistics - {pull}3590[#3590]
+* Fix too small activation stack size for small `transaction_max_spans` values - {pull}3643[#3643]
[[release-notes-1.x]]
=== Java Agent version 1.x
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
index d50ba17470..893dfb6c69 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
@@ -112,6 +112,7 @@ public class ElasticApmTracer implements Tracer {
private static final Map, Class extends ConfigurationOptionProvider>> configs = new HashMap<>();
public static final Set TRACE_HEADER_NAMES;
+ public static final int ACTIVATION_STACK_BASE_SIZE = 16;
static {
Set headerNames = new HashSet<>();
@@ -138,7 +139,10 @@ public class ElasticApmTracer implements Tracer {
private final ThreadLocal activeStack = new ThreadLocal() {
@Override
protected ActiveStack initialValue() {
- return new ActiveStack(transactionMaxSpans, emptyContext);
+ //We allow transactionMaxSpan activation plus a constant minimum of 16 to account for
+ // * the activation of the transaction itself
+ // * account for baggage updates, which also count towards the depth
+ return new ActiveStack(ACTIVATION_STACK_BASE_SIZE + transactionMaxSpans, emptyContext);
}
};
@@ -673,7 +677,7 @@ public synchronized void stop() {
public Reporter getReporter() {
return reporter;
}
-
+
public UniversalProfilingIntegration getProfilingIntegration() {
return profilingIntegration;
}
diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
index b365039737..6ef0970c47 100644
--- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
+++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/ElasticApmTracerTest.java
@@ -22,6 +22,7 @@
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.configuration.AutoDetectedServiceInfo;
import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.impl.baggage.BaggageContext;
import co.elastic.apm.agent.tracer.service.ServiceInfo;
import co.elastic.apm.agent.configuration.SpyConfiguration;
import co.elastic.apm.agent.configuration.source.ConfigSources;
@@ -52,6 +53,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -73,9 +75,15 @@ class ElasticApmTracerTest {
@BeforeEach
void setUp() {
+ doSetup(conf -> {
+ });
+ }
+
+ void doSetup(Consumer configCustomizer) {
objectPoolFactory = new TestObjectPoolFactory();
reporter = new MockReporter();
config = SpyConfiguration.createSpyConfig();
+ configCustomizer.accept(config);
apmServerClient = new ApmServerClient(config);
apmServerClient = mock(ApmServerClient.class, delegatesTo(apmServerClient));
@@ -88,6 +96,11 @@ void setUp() {
.buildAndStart();
}
+ void setupWithCustomConfig(Consumer configCustomizer) {
+ cleanupAndCheck(); //cleanup @BeforeEach
+ doSetup(configCustomizer);
+ }
+
@AfterEach
void cleanupAndCheck() {
reporter.assertRecycledAfterDecrementingReferences();
@@ -326,11 +339,14 @@ private ErrorCapture validateError(ErrorCapture error, AbstractSpan> span, boo
@Test
void testEnableDropSpans() {
- doReturn(1).when(tracerImpl.getConfig(CoreConfiguration.class)).getTransactionMaxSpans();
+ setupWithCustomConfig(conf -> {
+ doReturn(1).when(conf.getConfig(CoreConfiguration.class)).getTransactionMaxSpans();
+ });
Transaction transaction = startTestRootTransaction();
try (Scope scope = transaction.activateInScope()) {
Span span = tracerImpl.getActive().createSpan();
try (Scope spanScope = span.activateInScope()) {
+ assertThat(tracerImpl.getActive()).isSameAs(span); //ensure ActiveStack limit is not reached
assertThat(span.isSampled()).isTrue();
span.end();
}
@@ -359,48 +375,61 @@ void testActivationStackOverflow() {
.withObjectPoolFactory(objectPoolFactory)
.buildAndStart();
- Transaction transaction = tracer.startRootTransaction(getClass().getClassLoader());
- assertThat(tracer.getActive()).isNull();
- try (Scope scope = transaction.activateInScope()) {
- assertThat(tracer.getActive()).isEqualTo(transaction);
- Span child1 = transaction.createSpan();
- try (Scope childScope = child1.activateInScope()) {
- assertThat(tracer.getActive()).isEqualTo(child1);
- Span grandchild1 = child1.createSpan();
- try (Scope grandchildScope = grandchild1.activateInScope()) {
- // latter activation should not be applied due to activation stack overflow
+ doWithNestedBaggageActivations(() -> {
+ Transaction transaction = tracer.startRootTransaction(getClass().getClassLoader());
+ assertThat(tracer.getActive()).isNull();
+ try (Scope scope = transaction.activateInScope()) {
+ assertThat(tracer.getActive()).isEqualTo(transaction);
+ Span child1 = transaction.createSpan();
+ try (Scope childScope = child1.activateInScope()) {
assertThat(tracer.getActive()).isEqualTo(child1);
- Span ggc = grandchild1.createSpan();
- try (Scope ggcScope = ggc.activateInScope()) {
+ Span grandchild1 = child1.createSpan();
+ try (Scope grandchildScope = grandchild1.activateInScope()) {
+ // latter activation should not be applied due to activation stack overflow
assertThat(tracer.getActive()).isEqualTo(child1);
- ggc.end();
+ Span ggc = grandchild1.createSpan();
+ try (Scope ggcScope = ggc.activateInScope()) {
+ assertThat(tracer.getActive()).isEqualTo(child1);
+ ggc.end();
+ }
+ grandchild1.end();
}
- grandchild1.end();
+ assertThat(tracer.getActive()).isEqualTo(child1);
+ child1.end();
}
- assertThat(tracer.getActive()).isEqualTo(child1);
- child1.end();
- }
- assertThat(tracer.getActive()).isEqualTo(transaction);
- Span child2 = transaction.createSpan();
- try (Scope childScope = child2.activateInScope()) {
- assertThat(tracer.getActive()).isEqualTo(child2);
- Span grandchild2 = child2.createSpan();
- try (Scope grandchildScope = grandchild2.activateInScope()) {
- // latter activation should not be applied due to activation stack overflow
+ assertThat(tracer.getActive()).isEqualTo(transaction);
+ Span child2 = transaction.createSpan();
+ try (Scope childScope = child2.activateInScope()) {
+ assertThat(tracer.getActive()).isEqualTo(child2);
+ Span grandchild2 = child2.createSpan();
+ try (Scope grandchildScope = grandchild2.activateInScope()) {
+ // latter activation should not be applied due to activation stack overflow
+ assertThat(tracer.getActive()).isEqualTo(child2);
+ grandchild2.end();
+ }
assertThat(tracer.getActive()).isEqualTo(child2);
- grandchild2.end();
+ child2.end();
}
- assertThat(tracer.getActive()).isEqualTo(child2);
- child2.end();
+ assertThat(tracer.getActive()).isEqualTo(transaction);
+ transaction.end();
}
- assertThat(tracer.getActive()).isEqualTo(transaction);
- transaction.end();
- }
+ }, tracer, ElasticApmTracer.ACTIVATION_STACK_BASE_SIZE);
assertThat(tracer.getActive()).isNull();
assertThat(reporter.getTransactions()).hasSize(1);
assertThat(reporter.getSpans()).hasSize(2);
}
+ private void doWithNestedBaggageActivations(Runnable r, Tracer tracer, int nestedCount) {
+ if (nestedCount == 0) {
+ r.run();
+ return;
+ }
+ BaggageContext baggageContext = tracer.currentContext().withUpdatedBaggage().buildContext();
+ try (Scope scope = baggageContext.activateInScope()) {
+ doWithNestedBaggageActivations(r, tracer, nestedCount - 1);
+ }
+ }
+
@Test
void testPause() {
tracerImpl.pause();
From b1a41729f43377b8cfbed387753ebe4bcc0b405a Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Wed, 22 May 2024 10:21:28 +0200
Subject: [PATCH 066/132] Exclude new Cisco AppD packages (#3632)
---
CHANGELOG.asciidoc | 1 +
.../src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java | 2 ++
2 files changed, 3 insertions(+)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index feeb63febf..1b2dd1cafb 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,6 +34,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Features
* Added support for correlating APM data with elastic universal profiling data - {pull}3615[#3615], {pull}3602[#3602], {pull}3607[#3607], {pull}3598[#3598]
+* Excluded latest AppDynamics packages from instrumentation (`com.cisco.mtagent.*`) - {pull}3632[#3632]
[float]
===== Bug fixes
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
index 05e092c94e..d0c7a468c4 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
@@ -737,6 +737,8 @@ public Iterable extends List>> onError(int index, List> batc
.or(nameStartsWith("com.singularity."))
.or(any(), classLoaderWithNamePrefix("com.appdynamics."))
.or(nameStartsWith("com.appdynamics."))
+ .or(any(), classLoaderWithNamePrefix("com.cisco.mtagent."))
+ .or(nameStartsWith("com.cisco.mtagent."))
.or(any(), classLoaderWithNamePrefix("com.instana."))
.or(nameStartsWith("com.instana."))
.or(any(), classLoaderWithNamePrefix("datadog."))
From 098ee3c51a1cb0194207c5b86922c7ed454772e5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 22 May 2024 14:57:44 +0200
Subject: [PATCH 067/132] Bump version.okhttp from 3.14.7 to 4.12.0 (#3640)
Bumps `version.okhttp` from 3.14.7 to 4.12.0.
Updates `com.squareup.okhttp3:okhttp` from 3.14.7 to 4.12.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-3.14.7...parent-4.12.0)
Updates `com.squareup.okhttp3:logging-interceptor` from 4.9.1 to 4.12.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.1...parent-4.12.0)
---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
dependency-type: direct:production
update-type: version-update:semver-major
- dependency-name: com.squareup.okhttp3:logging-interceptor
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-dubbo-plugin/pom.xml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apm-agent-plugins/apm-dubbo-plugin/pom.xml b/apm-agent-plugins/apm-dubbo-plugin/pom.xml
index 3e927e43c3..30cf725dfe 100644
--- a/apm-agent-plugins/apm-dubbo-plugin/pom.xml
+++ b/apm-agent-plugins/apm-dubbo-plugin/pom.xml
@@ -39,7 +39,7 @@
com.squareup.okhttp3
okhttp
- 3.14.7
+ 4.12.0
test
diff --git a/pom.xml b/pom.xml
index 0066e0d189..7a9a8fb862 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,7 +119,7 @@
2.14.2
5.9.1
4.13.2
- 4.9.1
+ 4.12.0
1.7.36
- 3.2.0
+ 3.3.0
co.elastic.apm.agent.springwebflux.testapp.WebFluxApplication
From 33184bcc5e5ed7cd5536cdb07d68a2d6b3dd3393 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 30 May 2024 11:46:05 +0200
Subject: [PATCH 077/132] buildkite: use shared secret for obltmachine (#3656)
---
.buildkite/hooks/prepare-benchmark.sh | 6 ------
.buildkite/hooks/prepare-common.sh | 8 ++++++++
.buildkite/hooks/prepare-release.sh | 4 ++--
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/.buildkite/hooks/prepare-benchmark.sh b/.buildkite/hooks/prepare-benchmark.sh
index fb9f17b731..056042566a 100644
--- a/.buildkite/hooks/prepare-benchmark.sh
+++ b/.buildkite/hooks/prepare-benchmark.sh
@@ -7,12 +7,6 @@ ES_USER_SECRET=$(vault read -field=es_user secret/ci/elastic-apm-agent-java/open
ES_PASS_SECRET=$(vault read -field=es_pass secret/ci/elastic-apm-agent-java/opentelemetry-benchmark)
export ES_URL_SECRET ES_USER_SECRET ES_PASS_SECRET
-echo "--- Prepare github secrets :vault:"
-GITHUB_SECRET=$(vault kv get -field token "kv/ci-shared/observability-ci/github-bot-user")
-GITHUB_USERNAME=$(vault kv get -field username "kv/ci-shared/observability-ci/github-bot-user")
-GH_TOKEN=$GITHUB_SECRET
-export GITHUB_SECRET GH_TOKEN GITHUB_USERNAME
-
echo "--- Install gh :github:"
GH_URL=https://github.com/cli/cli/releases/download/v2.37.0/gh_2.37.0_linux_amd64.tar.gz
GH_HOME=$(pwd)/.gh
diff --git a/.buildkite/hooks/prepare-common.sh b/.buildkite/hooks/prepare-common.sh
index 7697908c6f..b3d16a1aae 100644
--- a/.buildkite/hooks/prepare-common.sh
+++ b/.buildkite/hooks/prepare-common.sh
@@ -35,3 +35,11 @@ fi
# Validate java is available in the runner.
java -version
+
+echo "--- Prepare github secrets :vault:"
+VAULT_SECRET_PATH=kv/ci-shared/observability-ci/github-bot-user
+GITHUB_SECRET=$(vault kv get -field token "${VAULT_SECRET_PATH}")
+GIT_USER=$(vault kv get -field username "${VAULT_SECRET_PATH}")
+GIT_EMAIL=$(vault kv get -field email "${VAULT_SECRET_PATH}")
+GH_TOKEN=$GITHUB_SECRET
+export GITHUB_SECRET GH_TOKEN GIT_USER GIT_EMAIL
diff --git a/.buildkite/hooks/prepare-release.sh b/.buildkite/hooks/prepare-release.sh
index def869b9d2..70175af39c 100644
--- a/.buildkite/hooks/prepare-release.sh
+++ b/.buildkite/hooks/prepare-release.sh
@@ -35,5 +35,5 @@ echo "$KEYPASS_SECRET" | gpg --batch --import "$KEY_FILE"
echo "--- Configure git context :git:"
# Configure the committer since the maven release requires to push changes to GitHub
# This will help with the SLSA requirements.
-git config --global user.email "infra-root+apmmachine@elastic.co"
-git config --global user.name "apmmachine"
+git config --global user.email "${GIT_EMAIL}"
+git config --global user.name "${GIT_USER}"
From 2596bdf6e65966bf9423147a15225df7195da796 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 30 May 2024 11:59:44 +0200
Subject: [PATCH 078/132] build: bump
org.springframework.boot:spring-boot-dependencies from 2.7.16 to 3.3.0
(#3645)
* build: bump org.springframework.boot:spring-boot-dependencies
Bumps [org.springframework.boot:spring-boot-dependencies](https://github.com/spring-projects/spring-boot) from 2.7.16 to 3.3.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v2.7.16...v3.3.0)
---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-dependencies
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
* keep older versions
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
.../apm-spring-resttemplate/apm-spring-restclient-test/pom.xml | 2 +-
.../apm-spring-resttemplate-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 2 +-
.../apm-spring-webmvc/apm-spring-webmvc-plugin/pom.xml | 2 +-
apm-agent-plugins/apm-spring-webmvc/pom.xml | 2 +-
integration-tests/spring-boot-3/pom.xml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
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 81b26c332b..f4b1d073da 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
@@ -20,7 +20,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.5
+ 3.3.0
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 a50d6633f0..7ded397ec8 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
@@ -23,7 +23,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.5
+ 3.3.0
pom
import
diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml
index 506262ae2e..c7b86d8426 100644
--- a/apm-agent-plugins/apm-spring-webflux/pom.xml
+++ b/apm-agent-plugins/apm-spring-webflux/pom.xml
@@ -18,7 +18,7 @@
2.7.16
- 3.2.5
+ 3.3.0
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 b875a4177e..474977cee6 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
@@ -22,7 +22,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.5
+ 3.3.0
pom
import
diff --git a/apm-agent-plugins/apm-spring-webmvc/pom.xml b/apm-agent-plugins/apm-spring-webmvc/pom.xml
index afb1961a69..823566ad06 100644
--- a/apm-agent-plugins/apm-spring-webmvc/pom.xml
+++ b/apm-agent-plugins/apm-spring-webmvc/pom.xml
@@ -29,7 +29,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.5
+ 3.3.0
pom
import
diff --git a/integration-tests/spring-boot-3/pom.xml b/integration-tests/spring-boot-3/pom.xml
index 00f3e59537..7e1ddecbb7 100644
--- a/integration-tests/spring-boot-3/pom.xml
+++ b/integration-tests/spring-boot-3/pom.xml
@@ -30,7 +30,7 @@
org.springframework.boot
spring-boot-dependencies
- 3.2.5
+ 3.3.0
pom
import
From 45095ff9e3b633175667dd338a99dc6e7eaed8c5 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Thu, 30 May 2024 14:57:42 +0200
Subject: [PATCH 079/132] revert jctools to 4.0.1 (#3657)
* revert jctools to 4.0.1
* update changelog
---
CHANGELOG.asciidoc | 4 ++++
apm-agent-core/pom.xml | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c98b6f6a22..f87aaa5350 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,6 +34,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[[release-notes-1.x]]
=== Java Agent version 1.x
+[float]
+===== Bug fixes
+* Restore compatibility with Java 7 - {pull}3657[#3657]
+
[[release-notes-1.50.0]]
==== 1.50.0 - 2024/05/28
diff --git a/apm-agent-core/pom.xml b/apm-agent-core/pom.xml
index 54b981fcf2..282b846b0e 100644
--- a/apm-agent-core/pom.xml
+++ b/apm-agent-core/pom.xml
@@ -56,7 +56,9 @@
org.jctools
jctools-core
- 4.0.3
+
+ 4.0.1
com.googlecode.concurrentlinkedhashmap
From e00a088f3ddb59bcd51dca04c0aa33255c86c6a4 Mon Sep 17 00:00:00 2001
From: jackshirazi
Date: Thu, 30 May 2024 15:57:53 +0100
Subject: [PATCH 080/132] add a jdk7 check so that we break before releasing!
(#3659)
---
.../src/test/java/co/elastic/apm/test/AgentSetupIT.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java b/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
index 28924ada91..fac320dffe 100644
--- a/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
+++ b/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
@@ -41,6 +41,7 @@ class AgentSetupIT {
@ParameterizedTest
@CsvSource({
+ "openjdk:7,STANDARD",
"openjdk:8,STANDARD",
"openjdk:8,JAVA8_BUILD",
"openjdk:11,STANDARD",
From 0e1fb43f64076fe77f739609513a1f8e7e1cff18 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 30 May 2024 17:41:21 +0200
Subject: [PATCH 081/132] github-actions: docker login with GitHub secrets
(#3658)
---
.github/workflows/main.yml | 13 +++++++------
.github/workflows/release.yml | 13 +++++++------
.github/workflows/snapshot.yml | 13 +++++++------
3 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d69d0d610e..4ffaa2cceb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -338,13 +338,14 @@ jobs:
if: github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' )
steps:
- uses: actions/checkout@v4
- - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
+
+ - name: Log in to the Elastic Container registry
+ uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
- registry: docker.elastic.co
- secret: secret/observability-team/ci/docker-registry/prod
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
+ registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
+ username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
+ password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
+
- uses: ./.github/workflows/unstash
with:
name: build
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6641ac0fca..d44347dd73 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -135,13 +135,14 @@ jobs:
with:
ref: ${{ inputs.ref }}
fetch-depth: 0 # Load entire history as it is required for the push-script
- - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
+
+ - name: Log in to the Elastic Container registry
+ uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
- registry: docker.elastic.co
- secret: secret/apm-team/ci/docker-registry/prod
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
+ registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
+ username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
+ password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
+
- name: "Build docker image"
shell: bash
run: ./scripts/docker-release/build_docker.sh "${{ env.RELEASE_VERSION }}"
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index a0e5139be1..9bede59356 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -80,13 +80,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
+
+ - name: Log in to the Elastic Container registry
+ uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
- registry: docker.elastic.co
- secret: secret/apm-team/ci/docker-registry/prod
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
+ registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
+ username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
+ password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
+
- name: prepare context for testing docker build
run: |
mkdir -p elastic-apm-agent/target
From 0c45a570790456cc20518799870f4ed1ce36518c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 3 Jun 2024 10:07:18 +0200
Subject: [PATCH 082/132] build: bump version.aws.sdk in /apm-agent-plugins
(#3661)
Bumps `version.aws.sdk` from 2.25.43 to 2.25.64.
Updates `software.amazon.awssdk:s3` from 2.25.43 to 2.25.64
Updates `software.amazon.awssdk:sqs` from 2.25.43 to 2.25.64
Updates `software.amazon.awssdk:dynamodb` from 2.25.43 to 2.25.64
---
updated-dependencies:
- dependency-name: software.amazon.awssdk:s3
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:sqs
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: software.amazon.awssdk:dynamodb
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-aws-sdk/apm-aws-sdk-2-plugin/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 e344f8be0b..90073a5292 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
@@ -13,7 +13,7 @@
${project.basedir}/../../..
- 2.25.43
+ 2.25.64
2.0.0
8
From 4a4d049615afe5779fb9b924fb6cd00e3d3381d0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 4 Jun 2024 12:51:13 +0200
Subject: [PATCH 083/132] build: bump version.byte-buddy from 1.14.14 to
1.14.17 (#3664)
* build: bump version.byte-buddy from 1.14.14 to 1.14.17
Bumps `version.byte-buddy` from 1.14.14 to 1.14.17.
Updates `net.bytebuddy:byte-buddy` from 1.14.14 to 1.14.17
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.14...byte-buddy-1.14.17)
Updates `net.bytebuddy:byte-buddy-agent` from 1.9.16 to 1.14.17
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.9.16...byte-buddy-1.14.17)
Updates `net.bytebuddy:byte-buddy-dep` from 1.14.14 to 1.14.17
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.14...byte-buddy-1.14.17)
---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: net.bytebuddy:byte-buddy-dep
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* revert old known version
* bump asm version to keep it consistent with bytebuddy
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com>
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7821579eca..decfa218b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,8 +131,8 @@
9.4.11.v20180605
1.4.0
- 1.14.14
- 9.6
+ 1.14.17
+ 9.7
5.4.0
5.12.0
From a1812e782c235313d08bb62e534ea9fd9cbd1352 Mon Sep 17 00:00:00 2001
From: Deniza Topalova <129867589+deni-topalova@users.noreply.github.com>
Date: Tue, 4 Jun 2024 13:53:56 +0300
Subject: [PATCH 084/132] adding an option to make routing-key part of RabbitMQ
transaction names (#3636)
Co-authored-by: Deniza Topalova
---
CHANGELOG.asciidoc | 4 ++
.../rabbitmq/ChannelInstrumentation.java | 15 ++++-
.../rabbitmq/ConsumerInstrumentation.java | 16 ++++-
.../apm/agent/rabbitmq/RabbitMQIT.java | 67 ++++++++++++++-----
.../configuration/MessagingConfiguration.java | 8 ++-
docs/configuration.asciidoc | 12 ++--
6 files changed, 93 insertions(+), 29 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f87aaa5350..3b82880c61 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -38,6 +38,10 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
===== Bug fixes
* Restore compatibility with Java 7 - {pull}3657[#3657]
+[float]
+===== Features
+* Added option to make routing-key part of RabbitMQ transaction/span names - {pull}3636[#3636]
+
[[release-notes-1.50.0]]
==== 1.50.0 - 2024/05/28
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ChannelInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ChannelInstrumentation.java
index 5fa4812ac1..35ec95f310 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ChannelInstrumentation.java
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ChannelInstrumentation.java
@@ -24,6 +24,7 @@
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
import co.elastic.apm.agent.tracer.ElasticContext;
import co.elastic.apm.agent.tracer.Span;
+import co.elastic.apm.agent.tracer.configuration.MessagingConfiguration;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
@@ -137,10 +138,9 @@ public static Object[] onBasicPublish(@Advice.This Channel channel,
if (exitSpan != null) {
exchange = normalizeExchangeName(exchange);
-
+ String transactionNameSuffix = normalizeExchangeName(resolveTransactionNameSuffix(exchange, routingKey));
exitSpan.withAction("send")
- .withName("RabbitMQ SEND to ").appendToName(exchange);
-
+ .withName("RabbitMQ SEND to ").appendToName(transactionNameSuffix);
}
properties = propagateTraceContext(tracer.currentContext(), properties);
@@ -174,6 +174,15 @@ private static AMQP.BasicProperties propagateTraceContext(ElasticContext> toPr
return properties.builder().headers(headersWithContext).build();
}
+ private static String resolveTransactionNameSuffix(String exchange, String routingKey) {
+
+ if (MessagingConfiguration.RabbitMQNamingMode.ROUTING_KEY == AbstractBaseInstrumentation.getRabbitMQNamingMode()) {
+ return routingKey;
+ } else {
+ return exchange;
+ }
+ }
+
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class, inline = false)
public static void afterBasicPublish(@Advice.Enter @Nullable Object[] enterArray,
@Advice.Thrown @Nullable Throwable throwable) {
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ConsumerInstrumentation.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ConsumerInstrumentation.java
index 2ac2847c0c..5659022575 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ConsumerInstrumentation.java
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/main/java/co/elastic/apm/agent/rabbitmq/ConsumerInstrumentation.java
@@ -20,6 +20,7 @@
import co.elastic.apm.agent.tracer.Transaction;
import co.elastic.apm.agent.rabbitmq.header.RabbitMQTextHeaderGetter;
+import co.elastic.apm.agent.tracer.configuration.MessagingConfiguration.RabbitMQNamingMode;
import co.elastic.apm.agent.tracer.metadata.Message;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import com.rabbitmq.client.AMQP;
@@ -106,8 +107,9 @@ public static Object onHandleDelivery(@Advice.Origin Class> originClazz,
return null;
}
+ String transactionNameSuffix = getExchangeOrRoutingKey(envelope);
transaction.withType("messaging")
- .withName("RabbitMQ RECEIVE from ").appendToName(normalizeExchangeName(exchange));
+ .withName("RabbitMQ RECEIVE from ").appendToName(normalizeExchangeName(transactionNameSuffix));
transaction.setFrameworkName("RabbitMQ");
@@ -129,5 +131,17 @@ public static void afterHandleDelivery(@Advice.Enter @Nullable final Object tran
.end();
}
}
+
+ private static String getExchangeOrRoutingKey(Envelope envelope) {
+ if (null == envelope) {
+ return null;
+ }
+
+ if (RabbitMQNamingMode.ROUTING_KEY == AbstractBaseInstrumentation.getRabbitMQNamingMode()) {
+ return envelope.getRoutingKey();
+ } else {
+ return envelope.getExchange();
+ }
+ }
}
}
diff --git a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java
index b43f719046..1899aa6f42 100644
--- a/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java
+++ b/apm-agent-plugins/apm-rabbitmq/apm-rabbitmq-plugin/src/test/java/co/elastic/apm/agent/rabbitmq/RabbitMQIT.java
@@ -56,6 +56,7 @@
import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.testutils.TestContainersUtils;
+import co.elastic.apm.agent.tracer.configuration.MessagingConfiguration.RabbitMQNamingMode;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
@@ -98,7 +99,7 @@ public class RabbitMQIT extends AbstractInstrumentationTest {
private static final String IMAGE = "rabbitmq:3.7-management-alpine";
private static final RabbitMQContainer container = new RabbitMQContainer(IMAGE);
- private static final String ROUTING_KEY = "test.key";
+ private static final String TEST_ROUTING_KEY = "test.key";
private static final byte[] MSG = "Testing APM!".getBytes();
@@ -203,7 +204,8 @@ void headersCaptureSanitize() throws IOException, InterruptedException {
), true);
}
- private void testHeadersCapture(Map headersMap, Map expectedHeaders, boolean expectTracingHeaders) throws IOException, InterruptedException {
+ private void testHeadersCapture(Map headersMap, Map expectedHeaders,
+ boolean expectTracingHeaders) throws IOException, InterruptedException {
performTest(
propertiesMap(headersMap),
false,
@@ -228,6 +230,15 @@ void ignoreExchangeName() throws IOException, InterruptedException {
});
}
+ @Test
+ void routingKeyInTransactionName() throws IOException, InterruptedException {
+ MessagingConfiguration messagingConfiguration = config.getConfig(MessagingConfiguration.class);
+ doReturn(RabbitMQNamingMode.ROUTING_KEY).when(messagingConfiguration).getRabbitMQNamingMode();
+
+ performTest(emptyProperties(), false, randString("exchange"), "different-routing-key",
+ (mt, ms) -> {});
+ }
+
private void performTest(@Nullable AMQP.BasicProperties properties) throws IOException, InterruptedException {
performTest(properties, false, randString("exchange"), (mt, ms) -> {
});
@@ -238,9 +249,18 @@ private void performTest(@Nullable AMQP.BasicProperties properties,
String channelName,
BiConsumer messageCheck) throws IOException, InterruptedException {
+ performTest(properties, shouldIgnore, channelName, TEST_ROUTING_KEY, messageCheck);
+ }
+
+ private void performTest(@Nullable AMQP.BasicProperties properties,
+ boolean shouldIgnore,
+ String channelName,
+ String routingKey,
+ BiConsumer messageCheck) throws IOException, InterruptedException {
+
Channel channel = connection.createChannel();
String exchange = createExchange(channel, channelName);
- String queue = createQueue(channel, exchange);
+ String queue = createQueue(channel, exchange, routingKey);
CountDownLatch messageReceived = new CountDownLatch(1);
@@ -248,7 +268,8 @@ private void performTest(@Nullable AMQP.BasicProperties properties,
// using an anonymous class to ensure class matching is properly applied
@Override
- public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {
+ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties,
+ byte[] body) throws IOException {
assertThat(properties).isNotNull();
Map headers = properties.getHeaders();
@@ -264,7 +285,7 @@ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProp
Transaction rootTransaction = startTestRootTransaction("Rabbit-Test Root Transaction");
- channel.basicPublish(exchange, ROUTING_KEY, properties, MSG);
+ channel.basicPublish(exchange, routingKey, properties, MSG);
endRootTransaction(rootTransaction);
@@ -285,17 +306,17 @@ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProp
return;
}
-
// 2 transactions, 1 span expected
getReporter().awaitTransactionCount(2);
getReporter().awaitSpanCount(1);
Transaction childTransaction = getNonRootTransaction(rootTransaction, getReporter().getTransactions());
- checkTransaction(childTransaction, exchange);
+ String transactionNameSuffix = !routingKey.equals(TEST_ROUTING_KEY) ? routingKey: exchange;
+ checkTransaction(childTransaction, exchange, transactionNameSuffix, "RabbitMQ");
Span span = getReporter().getSpans().get(0);
- checkSendSpan(span, exchange);
+ checkSendSpan(span, exchange, transactionNameSuffix);
// span should be child of the first transaction
checkParentChild(rootTransaction, span);
@@ -306,12 +327,11 @@ public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProp
Message spanMessage = span.getContext().getMessage();
Message transactionMessage = childTransaction.getContext().getMessage();
-
// test-specific assertions on captured message
messageCheck.accept(transactionMessage, spanMessage);
-
}
+
@Test
void testPollingWithinTransactionNoMessage() throws IOException {
Channel channel = connection.createChannel();
@@ -395,7 +415,7 @@ void testPollingIgnoreExchangeName() throws IOException {
private String declareAndBindQueue(String queue, String exchange, Channel channel) {
try {
channel.queueDeclare(queue, false, false, false, null);
- channel.queueBind(queue, exchange, ROUTING_KEY);
+ channel.queueBind(queue, exchange, TEST_ROUTING_KEY);
return queue;
} catch (IOException e) {
throw new IllegalStateException(e);
@@ -413,7 +433,7 @@ private void pollingTest(boolean withinTransaction, boolean withResult, Supplier
}
if (withResult) {
- channel.basicPublish(exchange, ROUTING_KEY, emptyProperties(), MSG);
+ channel.basicPublish(exchange, TEST_ROUTING_KEY, emptyProperties(), MSG);
}
channel.basicGet(queue, true);
@@ -573,9 +593,9 @@ static Transaction getNonRootTransaction(Transaction rootTransaction, List" : exchange);
+ .isEqualTo("RabbitMQ RECEIVE from %s", transactionNameSuffix.isEmpty() ? "" : transactionNameSuffix);
assertThat(transaction.getFrameworkName()).isEqualTo(frameworkName);
assertThat(transaction.getOutcome()).isEqualTo(Outcome.SUCCESS);
@@ -682,14 +706,23 @@ private static HashMap getHeadersMap(Message message) {
}
private static void checkSendSpan(Span span, String exchange) {
- checkSendSpan(span, exchange, connection.getAddress().getHostAddress(), connection.getPort());
+ checkSendSpan(span, exchange, exchange, connection.getAddress().getHostAddress(), connection.getPort());
+ }
+
+ private static void checkSendSpan(Span span, String exchange, String spanNameSuffix) {
+ checkSendSpan(span, exchange, spanNameSuffix, connection.getAddress().getHostAddress(), connection.getPort());
}
static void checkSendSpan(Span span, String exchange, String host, int port) {
+ checkSendSpan(span, exchange, exchange, host, port);
+ }
+
+ static void checkSendSpan(Span span, String exchange, String spanNameSuffix, String host, int port) {
String exchangeName = exchange.isEmpty() ? "" : exchange;
+ String spanName = spanNameSuffix.isEmpty() ? "" : spanNameSuffix;
checkSpanCommon(span,
"send",
- String.format("RabbitMQ SEND to %s", exchangeName),
+ String.format("RabbitMQ SEND to %s", spanName),
exchangeName,
true
);
diff --git a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
index 85420bc1b2..ab8c28322a 100644
--- a/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
+++ b/apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/configuration/MessagingConfiguration.java
@@ -111,8 +111,8 @@ public class MessagingConfiguration extends ConfigurationOptionProvider {
private final ConfigurationOption rabbitMQNamingMode = ConfigurationOption.enumOption(RabbitMQNamingMode.class)
.key("rabbitmq_naming_mode")
.configurationCategory(MESSAGING_CATEGORY)
- .description("Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.\n" +
- "Note that `QUEUE` only works when using RabbitMQ via spring-amqp."
+ .description("Defines whether the agent should use the exchanges, the routing key or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE`, `ROUTING_KEY` and `EXCHANGE`.\n" +
+ "Note that `QUEUE` only works when using RabbitMQ via spring-amqp and `ROUTING_KEY` only works for the non spring-client."
)
.dynamic(true)
.tags("added[1.46.0]")
@@ -187,5 +187,9 @@ public enum RabbitMQNamingMode {
* Use queue in transaction names
*/
QUEUE,
+ /**
+ * Use routing key in transaction names
+ */
+ ROUTING_KEY
}
}
diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc
index 1a31360d3f..3d124b4b2d 100644
--- a/docs/configuration.asciidoc
+++ b/docs/configuration.asciidoc
@@ -2513,12 +2513,12 @@ Starting from version 1.43.0, the classes that are part of the 'application_pack
[[config-rabbitmq-naming-mode]]
==== `rabbitmq_naming_mode` (added[1.46.0])
-Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.
-Note that `QUEUE` only works when using RabbitMQ via spring-amqp.
+Defines whether the agent should use the exchanges, the routing key or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE`, `ROUTING_KEY` and `EXCHANGE`.
+Note that `QUEUE` only works when using RabbitMQ via spring-amqp and `ROUTING_KEY` only works for the non spring-client.
<>
-Valid options: `EXCHANGE`, `QUEUE`
+Valid options: `EXCHANGE`, `QUEUE`, `ROUTING_KEY`
[options="header"]
|============
@@ -4703,10 +4703,10 @@ Example: `5ms`.
#
# jms_listener_packages=
-# Defines whether the agent should use the exchanges or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE` and `EXCHANGE`.
-# Note that `QUEUE` only works when using RabbitMQ via spring-amqp.
+# Defines whether the agent should use the exchanges, the routing key or the queue for the naming of RabbitMQ Transactions. Valid options are `QUEUE`, `ROUTING_KEY` and `EXCHANGE`.
+# Note that `QUEUE` only works when using RabbitMQ via spring-amqp and `ROUTING_KEY` only works for the non spring-client.
#
-# Valid options: EXCHANGE, QUEUE
+# Valid options: EXCHANGE, QUEUE, ROUTING_KEY
# This setting can be changed at runtime
# Type: RabbitMQNamingMode
# Default value: EXCHANGE
From 290c87a7796b54bf22ae8290a1a7946bcd7e07dc Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Tue, 4 Jun 2024 13:14:09 +0200
Subject: [PATCH 085/132] [release] improve release steps naming (#3667)
* enhance main branch PR message for merge with commit
* minor wording clarifications
* [release] rename release steps
* add PR created in first step in readme
---
.ci/release/update-major-branch.sh | 6 +++++-
.github/workflows/README.md | 17 ++++++++++++-----
.github/workflows/pre-post-release.yml | 12 ++++++++++--
.../{pre-release.yml => release-step-1.yml} | 4 +++-
.../{release.yml => release-step-3.yml} | 8 +++++---
5 files changed, 35 insertions(+), 12 deletions(-)
rename .github/workflows/{pre-release.yml => release-step-1.yml} (75%)
rename .github/workflows/{release.yml => release-step-3.yml} (96%)
diff --git a/.ci/release/update-major-branch.sh b/.ci/release/update-major-branch.sh
index 146364f498..31f6ebe80e 100755
--- a/.ci/release/update-major-branch.sh
+++ b/.ci/release/update-major-branch.sh
@@ -68,4 +68,8 @@ git checkout -b "update-major-${v}"
git push origin "update-major-${v}"
echo -e "\n--- create PR to update major branch"
-gh pr create --title="post release v${v}: update major branch" --base "${major_branch}" --head "update-major-${v}" -b "post release v${v}"
+gh pr create \
+ --title="[release] release-step-4 ${v}" \
+ --base "${major_branch}" \
+ --head "update-major-${v}" \
+ -b "Step 4 of the release process for version ${v}: review & merge with merge commit WITHOUT SQUASH to prevent conflicts"
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index cbc0140d24..8d8bd55ad9 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -36,11 +36,18 @@ Every time there is a merge to main or any branches the whole workflow will comp
### Release process
To release a new version of apm-agent-java, you must use the two GitHub Workflows.
-Trigger the `Pre Release` workflow targeting the release version.
-After merging the PRs created by the first workflow, you can trigger the `Release` workflow targeting the release version.
-It runs then a Buildkite pipeline in charge of generating and publishing the artifacts,
-for further details please go to [the buildkite folder](../../.buildkite/README.md).
-Finally, merge the PRs created to bump version for the next iteration.
+
+- Trigger the `release-step-1` GH workflow
+ - parameters: version to release
+ - will open `release-step-2` PR
+- Review and merge the `release-step-2` PR to `main` (version bump to release + changelog update)
+- Trigger the `release-step-3` GH workflow
+ - parameters: version to release and the `main` branch (or merge commit/ref of `release-step-2` PR merge).
+ - will generate and publish release artifact through [buildkite](../../.buildkite/README.md).
+ - will open two PRs: `release-step-4` and `release-step-5`
+ - will wait on the `release-step-4` PR to be merged and published (documentation update)
+- Review and merge the `release-step-4` PR to the "major branch", which is currently `1.x`, the documentation effective build and publication can take a while.
+- Review and merge the `release-step-5` PR to `main` (version bump from release to next snapshot version)
The tag release follows the naming convention: `v...`, where ``, `` and ``.
diff --git a/.github/workflows/pre-post-release.yml b/.github/workflows/pre-post-release.yml
index e34026ebd4..a6d1123e34 100644
--- a/.github/workflows/pre-post-release.yml
+++ b/.github/workflows/pre-post-release.yml
@@ -18,6 +18,14 @@ on:
description: 'Pre or post release phase'
type: string # valid values are 'pre' or 'post'
required: true
+ pr_title:
+ description: 'pull-request title'
+ type: string
+ required: true
+ pr_body:
+ description: : 'pull-request body'
+ type: string
+ required: true
env:
RELEASE_VERSION: ${{ inputs.version }}
@@ -91,8 +99,8 @@ jobs:
git add --all
git commit -m "${{ inputs.phase }} release: elastic-apm-agent ${{ env.RELEASE_VERSION_TAG }}"
git push origin ${{ env.BRANCH_NAME }}
-
+
- name: Create the ${{ inputs.phase }} release PR
- run: gh pr create --title="${{ inputs.phase }} release ${{ env.RELEASE_VERSION_TAG }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.phase }} release ${{ env.RELEASE_VERSION_TAG }}"
+ run: gh pr create --title="${{ inputs.pr_title }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.pr_body }}"
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/release-step-1.yml
similarity index 75%
rename from .github/workflows/pre-release.yml
rename to .github/workflows/release-step-1.yml
index 3fb0b6f71f..c0b5a1a365 100644
--- a/.github/workflows/pre-release.yml
+++ b/.github/workflows/release-step-1.yml
@@ -1,6 +1,6 @@
---
-name: Pre release
+name: 'release-step-1'
on:
workflow_dispatch:
@@ -29,4 +29,6 @@ jobs:
ref: ${{ inputs.ref }}
version: ${{ inputs.version }}
phase: 'pre'
+ pr_title: "[release] release-step-2 ${{ inputs.version }}"
+ pr_body: "Step 2 of the release process for version ${{ inputs.version }}: review & merge, then execute 'release-step-3' GH workflow"
secrets: inherit
diff --git a/.github/workflows/release.yml b/.github/workflows/release-step-3.yml
similarity index 96%
rename from .github/workflows/release.yml
rename to .github/workflows/release-step-3.yml
index d44347dd73..d2884219e0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release-step-3.yml
@@ -1,6 +1,6 @@
---
# Releases the agent
-name: release
+name: 'release-step-3'
on:
workflow_dispatch:
@@ -10,7 +10,7 @@ on:
required: true
default: "main"
version:
- description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required version bumps'
+ description: 'The version to release (e.g. 1.2.3). This workflow will automatically perform the required post-release version bumps'
required: true
skip_preparation:
description: |
@@ -55,7 +55,7 @@ jobs:
uses: ./.github/workflows/validate-tag
with:
tag: ${{ env.RELEASE_VERSION_TAG }}
- - name: Validate tag match current version
+ - name: Validate tag match current maven project version
run: |
if [ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" != "${{ env.RELEASE_VERSION }}" ]; then
echo "Tag should match pom.xml project.version"
@@ -212,6 +212,8 @@ jobs:
ref: ${{ inputs.ref }}
version: ${{ inputs.version }}
phase: 'post'
+ pr_title: "[release] release-step-5 ${{ inputs.version }}"
+ pr_body: "Step 5 of the release process for version ${{ inputs.version }}: review & merge"
secrets: inherit
update-major-branch:
From 2b7bdb57e3e1f0504a774abd0a57aba1f98a717c Mon Sep 17 00:00:00 2001
From: Jonas Kunz
Date: Tue, 4 Jun 2024 13:35:31 +0200
Subject: [PATCH 086/132] Fix unreleased changelog (#3669)
---
CHANGELOG.asciidoc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3b82880c61..6dee85db93 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,9 +31,6 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
=== Unreleased
-[[release-notes-1.x]]
-=== Java Agent version 1.x
-
[float]
===== Bug fixes
* Restore compatibility with Java 7 - {pull}3657[#3657]
@@ -42,6 +39,9 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
===== Features
* Added option to make routing-key part of RabbitMQ transaction/span names - {pull}3636[#3636]
+[[release-notes-1.x]]
+=== Java Agent version 1.x
+
[[release-notes-1.50.0]]
==== 1.50.0 - 2024/05/28
From 46aaa7431c30b9406e48437c65065e506d2d3b12 Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Tue, 4 Jun 2024 14:07:52 +0200
Subject: [PATCH 087/132] github-action: run buildkite action with GH secrets
(#3668)
---
.github/workflows/microbenchmark.yml | 31 +++++++---------------------
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/microbenchmark.yml b/.github/workflows/microbenchmark.yml
index c576f067dc..f1814b2e4b 100644
--- a/.github/workflows/microbenchmark.yml
+++ b/.github/workflows/microbenchmark.yml
@@ -21,36 +21,19 @@ permissions:
jobs:
microbenchmark:
runs-on: ubuntu-latest
- # wait up to 1 hour
- timeout-minutes: 60
+ timeout-minutes: 5
steps:
- - id: buildkite
- name: Run buildkite pipeline
- uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
+ - name: Run microbenchmark
+ uses: elastic/oblt-actions/buildkite/run@v1.5.0
env:
JAVA_VERSION: ${{ inputs.java_version || 'openjdk-17+35-linux' }}
with:
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
- pipeline: apm-agent-microbenchmark
- triggerMessage: "${{ github.repository }}@${{ github.ref_name }}"
- waitFor: true
- printBuildLogs: true
- buildEnvVars: |
+ pipeline: "apm-agent-microbenchmark"
+ token: ${{ secrets.BUILDKITE_TOKEN }}
+ wait-for: false
+ env-vars: |
script=.ci/scripts/bench.sh
repo=apm-agent-java
sha=${{ github.sha }}
JAVA_VERSION=${{ env.JAVA_VERSION }}
BRANCH_NAME=${{ github.ref_name }}
-
- - if: ${{ failure() }}
- uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- channel: "#apm-agent-java"
- message: |
- :ghost: [${{ github.repository }}] microbenchmark *${{ github.ref_name }}* failed to run in Buildkite.
- Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
From 65bbdbd05f7e6ad5a3e3211deb934ec59d57fc2a Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Tue, 4 Jun 2024 22:36:49 +0200
Subject: [PATCH 088/132] github-actions: remove snapshoty (#3670)
---
.ci/snapshoty.yml | 55 ---------------------------------
.github/workflows/README.md | 3 +-
.github/workflows/snapshoty.yml | 31 -------------------
3 files changed, 1 insertion(+), 88 deletions(-)
delete mode 100644 .ci/snapshoty.yml
delete mode 100644 .github/workflows/snapshoty.yml
diff --git a/.ci/snapshoty.yml b/.ci/snapshoty.yml
deleted file mode 100644
index e83c94de7b..0000000000
--- a/.ci/snapshoty.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-
-# Version of configuration to use
-version: '1.0'
-
-# You can define a Google Cloud Account to use
-account:
- # Project id of the service account
- project: '${GCS_PROJECT}'
- # Private key id of the service account
- private_key_id: '${GCS_PRIVATE_KEY_ID}'
- # Private key of the service account
- private_key: '${GCS_PRIVATE_KEY}'
- # Email of the service account
- client_email: '${GCS_CLIENT_EMAIL}'
- # URI token
- token_uri: 'https://oauth2.googleapis.com/token'
-
-x-metadata: &metadata
- # Define static custom metadata
- - name: 'custom'
- data:
- project: 'apm-agent-java'
- # Add git metadata
- - name: 'git'
- # Add github_actions metadata
- - name: 'github_actions'
-
-
-# List of artifacts
-artifacts:
- # Path to use for artifacts discovery
- - path: './elastic-apm-agent/target'
- # Files pattern to match
- files_pattern: 'elastic-apm-agent-(?P\d+\.\d+\.\d+(-\S+)?)\.jar'
- # File layout on GCS bucket
- output_pattern: '{project}/{github_branch_name}/elastic-apm-java-{app_version}-{github_sha_short}.jar'
- # List of metadata processors to use.
- metadata: *metadata
- - path: './elastic-apm-agent/target'
- files_pattern: 'elastic-apm-java-aws-lambda-layer-(?P\d+\.\d+\.\d+(-\S+)?)\.zip'
- output_pattern: '{project}/{github_branch_name}/elastic-apm-java-aws-lambda-layer-{app_version}-{github_sha_short}.zip'
- metadata: *metadata
- - path: './apm-agent-attach/target'
- files_pattern: 'apm-agent-attach-(?P\d+\.\d+\.\d+(-\S+)?)\.jar'
- output_pattern: '{project}/{github_branch_name}/elastic-apm-java-attach-{app_version}-{github_sha_short}.jar'
- metadata: *metadata
- - path: './apm-agent-attach-cli/target'
- files_pattern: 'apm-agent-attach-cli-(?P\d+\.\d+\.\d+(-\S+)?)\.jar'
- output_pattern: '{project}/{github_branch_name}/elastic-apm-java-attach-{app_version}-{github_sha_short}.jar'
- metadata: *metadata
- - path: './apm-agent-api/target'
- files_pattern: 'apm-agent-api-(?P\d+\.\d+\.\d+(-\S+)?)\.jar'
- output_pattern: '{project}/{github_branch_name}/elastic-apm-java-api-{app_version}-{github_sha_short}.jar'
- metadata: *metadata
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index 8d8bd55ad9..1d3ea8d495 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -10,7 +10,6 @@ There are 4 main stages that run on GitHub actions:
There are some other stages that run for every push on the main branches:
* [Microbenchmark](./microbenchmark.yml)
-* [Snapshoty](./snapshoty.yml)
* [Sync-branches](./sync-branches.yml)
### Scenarios
@@ -53,7 +52,7 @@ The tag release follows the naming convention: `v...`, wher
### OpenTelemetry
-There is a GitHub workflow in charge to populate what the workflow run in terms of jobs and steps. Those details can be seen in [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).
+Every workflow and its logs are exported to OpenTelemetry traces/logs/metrics. Those details can be seen [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).
## Bump automation
diff --git a/.github/workflows/snapshoty.yml b/.github/workflows/snapshoty.yml
deleted file mode 100644
index 875804ed99..0000000000
--- a/.github/workflows/snapshoty.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-# Publish a snapshot. A "snapshot" is a packaging of the latest *unreleased* APM agent,
-# published to a known GCS bucket for use in edge demo/test environments.
-name: Snapshoty
-
-on:
- push:
- branches:
- - main
- paths-ignore:
- - '*.md'
- - '*.asciidoc'
- - 'docs/**'
-
-jobs:
- upload:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: ./.github/workflows/maven-goal
- with:
- command: ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true
-
- - name: Publish snaphosts
- uses: elastic/apm-pipeline-library/.github/actions/snapshoty-simple@current
- with:
- config: '.ci/snapshoty.yml'
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
From 8633793d653ea8dd47e21e67ab6ae955897d7329 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Wed, 5 Jun 2024 15:26:53 +0200
Subject: [PATCH 089/132] [release] fix typo in release workflow (#3671)
---
.github/workflows/pre-post-release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/pre-post-release.yml b/.github/workflows/pre-post-release.yml
index a6d1123e34..4114ed50ad 100644
--- a/.github/workflows/pre-post-release.yml
+++ b/.github/workflows/pre-post-release.yml
@@ -23,7 +23,7 @@ on:
type: string
required: true
pr_body:
- description: : 'pull-request body'
+ description: 'pull-request body'
type: string
required: true
From f8c435a473d610064a709df3e67bf1cc2fca5489 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 5 Jun 2024 17:51:20 +0200
Subject: [PATCH 090/132] build: bump docker/login-action from 3.1.0 to 3.2.0
in the github-actions group (#3663)
Bumps the github-actions group with 1 update: [docker/login-action](https://github.com/docker/login-action).
Updates `docker/login-action` from 3.1.0 to 3.2.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/e92390c5fb421da1463c202d546fed0ec5c39f20...0d4c9c5ea7693da7b068278f7b52bda2a190a446)
---
.github/workflows/main.yml | 2 +-
.github/workflows/release-step-3.yml | 2 +-
.github/workflows/snapshot.yml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 4ffaa2cceb..4691fb2baa 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -340,7 +340,7 @@ jobs:
- uses: actions/checkout@v4
- name: Log in to the Elastic Container registry
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
+ uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index d2884219e0..203c61d9c5 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -137,7 +137,7 @@ jobs:
fetch-depth: 0 # Load entire history as it is required for the push-script
- name: Log in to the Elastic Container registry
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
+ uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 9bede59356..9ecfbdb82e 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v4
- name: Log in to the Elastic Container registry
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
+ uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
From 7c63ade90ec53806c4f5037271657eb6f0205039 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 10 Jun 2024 15:19:43 +0100
Subject: [PATCH 091/132] build: bump actions/attest-build-provenance in the
github-actions group (#3673)
Bumps the github-actions group with 1 update: [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance).
Updates `actions/attest-build-provenance` from 1.1.2 to 1.2.0
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/173725a1209d09b31f9d30a3890cf2757ebbff0d...49df96e17e918a15956db358890b08e61c704919)
---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-actions
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/release-step-3.yml | 2 +-
.github/workflows/snapshot.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index 203c61d9c5..e0174ff62a 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -106,7 +106,7 @@ jobs:
run: tar xvf ${{ env.TARBALL_FILE }}
- name: generate build provenance
- uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2
+ uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
with:
subject-path: "${{ github.workspace }}/**/target/*.jar"
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 9ecfbdb82e..0b67429b9f 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -71,7 +71,7 @@ jobs:
run: tar xvf ${{ env.TARBALL_FILE }}
- name: generate build provenance
- uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2
+ uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
with:
subject-path: "${{ github.workspace }}/**/target/*.jar"
From f17e701a0acf2355ed2afe6f8257453ca3563d60 Mon Sep 17 00:00:00 2001
From: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Date: Mon, 10 Jun 2024 18:54:52 +0200
Subject: [PATCH 092/132] Warn unexpected SpanContext in otel span link (#3672)
* add warning with non elastic spancontext
* update changelog
---
CHANGELOG.asciidoc | 1 +
.../tracing/OTelSpanBuilder.java | 20 +++++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6dee85db93..0103c59e29 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,6 +34,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Bug fixes
* Restore compatibility with Java 7 - {pull}3657[#3657]
+* Avoid `ClassCastException` and issue warning when trying to use otel span links - {pull}3672[#3672]
[float]
===== Features
diff --git a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java
index c56200146a..ef550e9d0e 100644
--- a/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java
+++ b/apm-agent-plugins/apm-opentelemetry/apm-opentelemetry-plugin/src/main/java/co/elastic/apm/agent/opentelemetry/tracing/OTelSpanBuilder.java
@@ -22,16 +22,15 @@
import co.elastic.apm.agent.impl.baggage.Baggage;
import co.elastic.apm.agent.impl.transaction.AbstractSpan;
import co.elastic.apm.agent.impl.transaction.MultiValueMapAccessor;
-import co.elastic.apm.agent.impl.transaction.OTelSpanKind;
-import co.elastic.apm.agent.tracer.Outcome;
import co.elastic.apm.agent.impl.transaction.TraceContext;
import co.elastic.apm.agent.impl.transaction.Transaction;
import co.elastic.apm.agent.opentelemetry.baggage.OtelBaggage;
-import co.elastic.apm.agent.sdk.logging.Logger;
-import co.elastic.apm.agent.sdk.logging.LoggerFactory;
import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.sdk.internal.util.VersionUtils;
+import co.elastic.apm.agent.sdk.logging.Logger;
+import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.Outcome;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.common.AttributeKey;
@@ -53,7 +52,8 @@
class OTelSpanBuilder implements SpanBuilder {
- private static final Logger addLinkLogger = LoggerUtils.logOnce(LoggerFactory.getLogger(OTelSpanBuilder.class));
+ private static final Logger addLinkLogger1 = LoggerUtils.logOnce(LoggerFactory.getLogger(OTelSpanBuilder.class));
+ private static final Logger addLinkLogger2 = LoggerUtils.logOnce(LoggerFactory.getLogger(OTelSpanBuilder.class));
private final String spanName;
private final ElasticApmTracer elasticApmTracer;
@@ -86,15 +86,19 @@ public SpanBuilder setNoParent() {
@Override
public SpanBuilder addLink(SpanContext spanContext) {
+ if (!(spanContext instanceof OTelSpanContext)) {
+ addLinkLogger2.warn("Adding arbitrary span context to links is currently unsupported");
+ return this;
+ }
links.add(spanContext);
return this;
}
@Override
- public SpanBuilder addLink(SpanContext spanContext, Attributes attributes1) {
+ public SpanBuilder addLink(SpanContext spanContext, @Nullable Attributes attributes1) {
addLink(spanContext);
if (attributes1 != null && !attributes1.isEmpty()) {
- addLinkLogger.warn("Adding attributes to links is currently unsupported - the links have been added but with no attributes, the following attributes have been ignored: %s",attributes1);
+ addLinkLogger1.warn("Adding attributes to links is currently unsupported - the links have been added but with no attributes, the following attributes have been ignored: %s", attributes1);
}
return this;
}
@@ -182,7 +186,7 @@ public Span startSpan() {
t.setFrameworkName("OpenTelemetry API");
String otelVersion = VersionUtils.getVersion(OpenTelemetry.class, "io.opentelemetry", "opentelemetry-api");
- if(otelVersion != null){
+ if (otelVersion != null) {
t.setFrameworkVersion(otelVersion);
}
}
From 0ad37da0f74e2022b2c0d713981850771fcef0bd Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Wed, 12 Jun 2024 13:15:41 +0200
Subject: [PATCH 093/132] ci: use github secrets for GH token (#3678)
---
.github/workflows/pre-post-release.yml | 16 ++++------------
.github/workflows/release-step-3.yml | 15 +++++----------
2 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/pre-post-release.yml b/.github/workflows/pre-post-release.yml
index 4114ed50ad..18b61057e9 100644
--- a/.github/workflows/pre-post-release.yml
+++ b/.github/workflows/pre-post-release.yml
@@ -55,24 +55,16 @@ jobs:
- validate-tag
permissions:
contents: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
steps:
- - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
-
- - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
- with:
- username: ${{ env.GIT_USER }}
- email: ${{ env.GIT_EMAIL }}
- token: ${{ env.GITHUB_TOKEN }}
-
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
token: ${{ env.GITHUB_TOKEN }}
+ - uses: elastic/oblt-actions/git/setup@v1
+
- name: Create the release tag (post phase)
if: inputs.phase == 'post'
run: |
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index e0174ff62a..6e671d1b56 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -223,21 +223,16 @@ jobs:
- post-release
permissions:
contents: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
steps:
- - uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
- with:
- username: ${{ env.GIT_USER }}
- email: ${{ env.GIT_EMAIL }}
- token: ${{ env.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
token: ${{ env.GITHUB_TOKEN }}
+
+ - uses: elastic/oblt-actions/git/setup@v1
+
- name: Update major branch
if: ${{ ! inputs.dry_run }}
run: .ci/release/update-major-branch.sh ${{ env.RELEASE_VERSION }}
From 249dbbaa8d3858023d2de6657c78fcf69a9cc68b Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 13 Jun 2024 12:16:54 +0200
Subject: [PATCH 094/132] feat(aws-lambda): apm-agent-java (#3680)
---
.github/workflows/release-step-3.yml | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index 6e671d1b56..442a430805 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -162,6 +162,9 @@ jobs:
# Random region. This needs to be set in GH Actions or the usage of aws-cli will fail.
# The default region does not matter, since we are publishing in all regions.
AWS_DEFAULT_REGION: eu-west-1
+ # TODO: use keyless
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
with:
@@ -170,15 +173,7 @@ jobs:
uses: ./.github/workflows/maven-goal
with:
command: ./mvnw dependency:purge-local-repository package -pl apm-agent-lambda-layer
- - uses: hashicorp/vault-action@v3.0.0
- with:
- url: ${{ secrets.VAULT_ADDR }}
- method: approle
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- secrets: |
- secret/observability-team/ci/service-account/apm-aws-lambda access_key_id | AWS_ACCESS_KEY_ID ;
- secret/observability-team/ci/service-account/apm-aws-lambda secret_access_key | AWS_SECRET_ACCESS_KEY
+
- name: Publish
if: ${{ ! inputs.dry_run }}
run: |
From 0202d48b229853a04e863ef1662c6415ebac766a Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 13 Jun 2024 13:35:33 +0200
Subject: [PATCH 095/132] github-actions: use buildkite and slack bot GH
secrets (#3679)
---
.github/workflows/release-step-3.yml | 33 +++++++++++--------------
.github/workflows/snapshot.yml | 36 +++++++++++++---------------
2 files changed, 30 insertions(+), 39 deletions(-)
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index 442a430805..d0a0f82675 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -81,26 +81,23 @@ jobs:
env:
TARBALL_FILE: artifacts.tar
steps:
- - id: buildkite
+ - id: buildkite-run
continue-on-error: true
- name: Run Deploy
- uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
+ uses: elastic/oblt-actions/buildkite/run@v1
with:
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
- pipeline: apm-agent-java-release
- waitFor: true
- printBuildLogs: false
- artifactName: releases
- artifactPath: ${{ env.TARBALL_FILE }}
- buildEnvVars: |
+ pipeline: "apm-agent-java-release"
+ token: ${{ secrets.BUILDKITE_TOKEN }}
+ wait-for: true
+ env-vars: |
dry_run=${{ inputs.dry_run || 'false' }}
TARBALL_FILE=${{ env.TARBALL_FILE }}
- - uses: actions/download-artifact@v3
+ - uses: elastic/oblt-actions/buildkite/download-artifact@v1
with:
- name: releases
+ build-number: ${{ steps.buildkite-run.outputs.build }}
+ path: "${{ env.TARBALL_FILE }}"
+ pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
+ token: ${{ secrets.BUILDKITE_TOKEN }}
- name: untar the buildkite tarball
run: tar xvf ${{ env.TARBALL_FILE }}
@@ -282,10 +279,8 @@ jobs:
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
with:
needs: ${{ toJSON(needs) }}
- - uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
+ - uses: elastic/oblt-actions/slack/notify-result@v1
with:
+ bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
+ channel-id: "#apm-agent-java"
status: ${{ steps.check.outputs.status }}
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
- slackChannel: "#apm-agent-java"
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 0b67429b9f..3e84224e51 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -46,26 +46,24 @@ jobs:
TARBALL_FILE: artifacts.tar
if: ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
steps:
- - id: buildkite
- name: Run Deploy
- uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
+ - id: buildkite-run
+ continue-on-error: true
+ uses: elastic/oblt-actions/buildkite/run@v1
with:
- vaultUrl: ${{ secrets.VAULT_ADDR }}
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
- pipeline: apm-agent-java-snapshot
- pipelineBranch: ${{ github.ref_name }}
- artifactName: snapshots
- artifactPath: ${{ env.TARBALL_FILE }}
- waitFor: true
- printBuildLogs: false
- buildEnvVars: |
+ branch: ${{ github.ref_name }}
+ pipeline: "apm-agent-java-snapshot"
+ token: ${{ secrets.BUILDKITE_TOKEN }}
+ wait-for: true
+ env-vars: |
dry_run=${{ inputs.dry_run || 'false' }}
TARBALL_FILE=${{ env.TARBALL_FILE }}
- - uses: actions/download-artifact@v3
+ - uses: elastic/oblt-actions/buildkite/download-artifact@v1
with:
- name: snapshots
+ build-number: ${{ steps.buildkite-run.outputs.build }}
+ path: "${{ env.TARBALL_FILE }}"
+ pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
+ token: ${{ secrets.BUILDKITE_TOKEN }}
- name: untar the buildkite tarball
run: tar xvf ${{ env.TARBALL_FILE }}
@@ -108,12 +106,10 @@ jobs:
with:
needs: ${{ toJSON(needs) }}
- if: ${{ failure() && ! inputs.dry_run }}
- uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
+ uses: elastic/oblt-actions/slack/send@v1
with:
- url: ${{ secrets.VAULT_ADDR }}
- roleId: ${{ secrets.VAULT_ROLE_ID }}
- secretId: ${{ secrets.VAULT_SECRET_ID }}
- channel: "#apm-agent-java"
+ bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
+ channel-id: "#apm-agent-java"
message: |
:ghost: [${{ github.repository }}] Snapshot *${{ github.ref_name }}* didn't get triggered in Buildkite.
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
From d1286397fde04e7eccc9125f3b97b7bc2663155b Mon Sep 17 00:00:00 2001
From: Victor Martinez
Date: Thu, 13 Jun 2024 15:03:20 +0200
Subject: [PATCH 096/132] github-actions: use number output (#3681)
---
.github/workflows/release-step-3.yml | 2 +-
.github/workflows/snapshot.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml
index d0a0f82675..7b90e66a5e 100644
--- a/.github/workflows/release-step-3.yml
+++ b/.github/workflows/release-step-3.yml
@@ -94,7 +94,7 @@ jobs:
- uses: elastic/oblt-actions/buildkite/download-artifact@v1
with:
- build-number: ${{ steps.buildkite-run.outputs.build }}
+ build-number: ${{ steps.buildkite-run.outputs.number }}
path: "${{ env.TARBALL_FILE }}"
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
token: ${{ secrets.BUILDKITE_TOKEN }}
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 3e84224e51..cc7ef381dc 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -60,7 +60,7 @@ jobs:
- uses: elastic/oblt-actions/buildkite/download-artifact@v1
with:
- build-number: ${{ steps.buildkite-run.outputs.build }}
+ build-number: ${{ steps.buildkite-run.outputs.number }}
path: "${{ env.TARBALL_FILE }}"
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
token: ${{ secrets.BUILDKITE_TOKEN }}
From 68c1fb98fe9e05c6fe895ea0c3ff1bf0ace794cc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 13 Jun 2024 15:26:54 +0100
Subject: [PATCH 097/132] build: bump
io.opentelemetry.semconv:opentelemetry-semconv (#3674)
Bumps [io.opentelemetry.semconv:opentelemetry-semconv](https://github.com/open-telemetry/semantic-conventions-java) from 1.23.1-alpha to 1.25.0-alpha.
- [Release notes](https://github.com/open-telemetry/semantic-conventions-java/releases)
- [Changelog](https://github.com/open-telemetry/semantic-conventions-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/semantic-conventions-java/commits)
---
updated-dependencies:
- dependency-name: io.opentelemetry.semconv:opentelemetry-semconv
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
apm-agent-plugins/apm-opentelemetry/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apm-agent-plugins/apm-opentelemetry/pom.xml b/apm-agent-plugins/apm-opentelemetry/pom.xml
index 156e328930..aea7599cd0 100644
--- a/apm-agent-plugins/apm-opentelemetry/pom.xml
+++ b/apm-agent-plugins/apm-opentelemetry/pom.xml
@@ -20,7 +20,7 @@
to make sure that in the future we stay compatible with the previous version.
-->
1.32.0
- 1.23.1-alpha
+ 1.25.0-alpha
8
8
From d86e7962cc670757db302a426c8e752f3cbf6d35 Mon Sep 17 00:00:00 2001
From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
Date: Fri, 14 Jun 2024 17:35:22 +0800
Subject: [PATCH 098/132] Remove unused functions and clean up servlet
integration test base (#3683)
* Remove unused functions and clean up servlet integration test base
Signed-off-by: Adrian Cole
* less code
Signed-off-by: Adrian Cole
---------
Signed-off-by: Adrian Cole
---
...stractServletContainerIntegrationTest.java | 105 +++++-------------
.../co/elastic/apm/servlet/WebSphereIT.java | 5 -
2 files changed, 30 insertions(+), 80 deletions(-)
diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
index 07a9b2540b..935a33ab44 100644
--- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
+++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
@@ -28,12 +28,11 @@
import co.elastic.apm.servlet.tests.TestApp;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.dockerjava.api.command.StopContainerCmd;
import okhttp3.Headers;
import okhttp3.OkHttpClient;
import okhttp3.Request;
-import okhttp3.RequestBody;
import okhttp3.Response;
-import okhttp3.ResponseBody;
import okhttp3.logging.HttpLoggingInterceptor;
import org.junit.After;
import org.junit.Test;
@@ -49,7 +48,13 @@
import java.io.IOException;
import java.nio.file.Paths;
import java.time.Duration;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@@ -176,23 +181,10 @@ protected AbstractServletContainerIntegrationTest(AgentTestContainer.AppServer c
container.start();
if (runtimeAttachSupported()) {
- if (AGENT_VERSION_TO_DOWNLOAD_FROM_MAVEN != null) {
- container.startCliRuntimeAttach(AGENT_VERSION_TO_DOWNLOAD_FROM_MAVEN);
- } else {
- container.startCliRuntimeAttach(AGENT_VERSION_TO_DOWNLOAD_FROM_MAVEN);
- }
+ container.startCliRuntimeAttach(AGENT_VERSION_TO_DOWNLOAD_FROM_MAVEN);
}
}
- private static OkHttpClient setupHttpClient(boolean isDebug) {
- final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(logger::info);
- loggingInterceptor.setLevel(isDebug ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.BASIC);
- return new OkHttpClient.Builder()
- .addInterceptor(loggingInterceptor)
- .readTimeout(isDebug ? 0 : 10, TimeUnit.SECONDS)
- .build();
- }
-
protected void beforeContainerStart(AgentTestContainer.AppServer container) {
}
@@ -216,9 +208,13 @@ protected boolean runtimeAttachSupported() {
@After
public final void stopServer() {
- container.getDockerClient()
- .stopContainerCmd(container.getContainerId())
- .exec();
+ if (!container.isRunning()) {
+ return; // prevent NPE on container.getContainerId()
+ }
+ // allow graceful shutdown before killing and removing the container
+ try (StopContainerCmd stopContainerCmd = container.getDockerClient().stopContainerCmd(container.getContainerId())) {
+ stopContainerCmd.exec();
+ }
container.stop();
}
@@ -271,29 +267,29 @@ public JsonNode assertTransactionReported(String pathToTest, int expectedRespons
return transaction;
}
- public String executeAndValidateRequest(String pathToTest, String expectedContent, Integer expectedResponseCode,
+ public void executeAndValidateRequest(String pathToTest, String expectedContent, Integer expectedResponseCode,
Map headersMap) throws IOException, InterruptedException {
- Response response = executeRequest(pathToTest, headersMap);
- if (expectedResponseCode != null) {
- assertThat(response.code())
- .withFailMessage(response.toString() + getServerLogs())
- .isEqualTo(expectedResponseCode);
+ final String responseString;
+ try (Response response = executeRequest(pathToTest, headersMap)) {
+ if (expectedResponseCode != null) {
+ assertThat(response.code())
+ .withFailMessage(response + getServerLogs())
+ .isEqualTo(expectedResponseCode);
+ }
+ responseString = response.body().string();
}
- final ResponseBody responseBody = response.body();
- assertThat(responseBody).isNotNull();
- String responseString = responseBody.string();
if (expectedContent != null) {
assertThat(responseString)
.describedAs("unexpected response content")
.contains(expectedContent);
}
- return responseString;
}
private void executeStatusRequestAndCheckIgnored(String statusEndpoint) throws IOException {
Map headers = Collections.emptyMap();
- Response response = executeRequest(statusEndpoint, headers);
- assertThat(response.code()).isEqualTo(200);
+ try (Response response = executeRequest(statusEndpoint, headers)) {
+ assertThat(response.code()).isEqualTo(200);
+ }
try {
Thread.sleep(200);
@@ -308,33 +304,6 @@ private void executeStatusRequestAndCheckIgnored(String statusEndpoint) throws I
}
- public String executeAndValidatePostRequest(String pathToTest, RequestBody postBody, String expectedContent, Integer expectedResponseCode) throws IOException, InterruptedException {
- Response response = executePostRequest(pathToTest, postBody);
- if (expectedResponseCode != null) {
- assertThat(response.code())
- .withFailMessage(response.toString() + getServerLogs())
- .isEqualTo(expectedResponseCode);
- }
- final ResponseBody responseBody = response.body();
- assertThat(responseBody).isNotNull();
- String responseString = responseBody.string();
- if (expectedContent != null) {
- assertThat(responseString).contains(expectedContent);
- }
- return responseString;
- }
-
- public Response executePostRequest(String pathToTest, RequestBody postBody) throws IOException {
- if (!pathToTest.startsWith("/")) {
- pathToTest = "/" + pathToTest;
- }
- return httpClient.newCall(new Request.Builder()
- .post(postBody)
- .url(getBaseUrl() + pathToTest)
- .build())
- .execute();
- }
-
public Response executeRequest(String pathToTest, Map headersMap) throws IOException {
Headers headers = Headers.of((headersMap != null) ? headersMap : new HashMap<>());
if (!pathToTest.startsWith("/")) {
@@ -368,7 +337,7 @@ public List assertSpansTransactionId(Supplier> supplier
List reportedSpans;
do {
reportedSpans = supplier.get();
- } while (reportedSpans.size() == 0 && System.currentTimeMillis() - start < timeout);
+ } while (reportedSpans.isEmpty() && System.currentTimeMillis() - start < timeout);
assertThat(reportedSpans)
.describedAs("at least one span is expected")
.isNotEmpty();
@@ -386,7 +355,7 @@ public List assertErrorContent(int timeoutMs, Supplier>
List reportedErrors;
do {
reportedErrors = supplier.get();
- } while (reportedErrors.size() == 0 && System.currentTimeMillis() - start < timeoutMs);
+ } while (reportedErrors.isEmpty() && System.currentTimeMillis() - start < timeoutMs);
assertThat(reportedErrors.size()).isEqualTo(1);
for (JsonNode error : reportedErrors) {
assertThat(error.get("transaction_id").textValue()).isEqualTo(transactionId);
@@ -529,16 +498,6 @@ private void validateMetadataEvent(JsonNode metadata) {
assertThat(jsonContainer.get("id").textValue()).isEqualTo(container.getContainerId());
}
- private void addSpans(List spans, JsonNode payload) {
- final JsonNode jsonSpans = payload.get("spans");
- if (jsonSpans != null) {
- for (JsonNode jsonSpan : jsonSpans) {
- mockReporter.verifyTransactionSchema(jsonSpan);
- spans.add(jsonSpan);
- }
- }
- }
-
private void waitFor(String path) {
Wait.forHttp(path)
.forPort(webPort)
@@ -550,8 +509,4 @@ private void waitFor(String path) {
public OkHttpClient getHttpClient() {
return httpClient;
}
-
- public boolean isHotSpotBased() {
- return true;
- }
}
diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/WebSphereIT.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/WebSphereIT.java
index aab9cb0e74..58583b2312 100644
--- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/WebSphereIT.java
+++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/WebSphereIT.java
@@ -52,11 +52,6 @@ public boolean isExpectedStacktrace(String path) {
return true;
}
- @Override
- public boolean isHotSpotBased() {
- return false;
- }
-
@Override
protected Iterable> getTestClasses() {
return Arrays.asList(
From cd893419137fd80981505c754ecea5cce6fb0bbd Mon Sep 17 00:00:00 2001
From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
Date: Mon, 17 Jun 2024 18:42:02 +0800
Subject: [PATCH 099/132] Uses MockWebServer instead of a docker container for
servlet integration tests (#3684)
Signed-off-by: Adrian Cole
---
.../pom.xml | 6 +
...stractServletContainerIntegrationTest.java | 121 +++++++++++++-----
2 files changed, 94 insertions(+), 33 deletions(-)
diff --git a/integration-tests/application-server-integration-tests/pom.xml b/integration-tests/application-server-integration-tests/pom.xml
index 56c97e94f5..678cdf478c 100644
--- a/integration-tests/application-server-integration-tests/pom.xml
+++ b/integration-tests/application-server-integration-tests/pom.xml
@@ -118,6 +118,12 @@
logging-interceptor
${version.okhttp}
+
+ com.squareup.okhttp3
+ mockwebserver
+ ${version.okhttp}
+ test
+
org.testcontainers
testcontainers
diff --git a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
index 935a33ab44..a46f49ea4e 100644
--- a/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
+++ b/integration-tests/application-server-integration-tests/src/test/java/co/elastic/apm/servlet/AbstractServletContainerIntegrationTest.java
@@ -24,7 +24,6 @@
import co.elastic.apm.agent.test.AgentFileAccessor;
import co.elastic.apm.agent.test.AgentTestContainer;
import co.elastic.apm.agent.test.JavaExecutable;
-import co.elastic.apm.agent.testutils.TestContainersUtils;
import co.elastic.apm.servlet.tests.TestApp;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -34,11 +33,15 @@
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.logging.HttpLoggingInterceptor;
+import okhttp3.mockwebserver.Dispatcher;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+import okio.Buffer;
+import okio.InflaterSource;
import org.junit.After;
import org.junit.Test;
-import org.mockserver.model.ClearType;
-import org.mockserver.model.HttpRequest;
-import org.mockserver.model.HttpResponse;
+import org.testcontainers.Testcontainers;
import org.testcontainers.containers.Network;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.utility.MountableFile;
@@ -46,6 +49,7 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
+import java.io.UncheckedIOException;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.ArrayList;
@@ -55,13 +59,16 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.stream.Collectors;
+import java.util.zip.Inflater;
import static co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.INTAKE_V2_URL;
+import static co.elastic.apm.agent.report.IntakeV2ReportingEventHandler.INTAKE_V2_FLUSH_URL;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockserver.model.HttpRequest.request;
/**
* When you want to execute the test in the IDE, execute {@code mvn clean package} before.
@@ -84,19 +91,14 @@ public abstract class AbstractServletContainerIntegrationTest {
@Nullable
private static final String AGENT_VERSION_TO_DOWNLOAD_FROM_MAVEN = null;
- private static final MockServerContainer mockServerContainer;
+ private static final MockWebServer apmServer;
+ private static final Queue receivedIntakeEvents = new ConcurrentLinkedQueue<>();
private static final OkHttpClient httpClient;
static {
- mockServerContainer = new MockServerContainer()
- .withNetworkAliases("apm-server")
- .waitingFor(Wait.forHttp(MockServerContainer.HEALTH_ENDPOINT).forStatusCode(200))
- .withNetwork(Network.SHARED);
-
- if (JavaExecutable.isDebugging()) {
- mockServerContainer.withLogConsumer(TestContainersUtils.createSlf4jLogConsumer(MockServerContainer.class));
- }
+ apmServer = new MockWebServer();
+ apmServer.setDispatcher(new ApmDispatcher());
final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(logger::info);
loggingInterceptor.setLevel(JavaExecutable.isDebugging() ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.BASIC);
@@ -105,9 +107,13 @@ public abstract class AbstractServletContainerIntegrationTest {
.readTimeout(JavaExecutable.isDebugging() ? 0 : 10, TimeUnit.SECONDS)
.build();
- mockServerContainer.start();
- mockServerContainer.getClient().when(request(INTAKE_V2_URL)).respond(HttpResponse.response().withStatusCode(200));
- mockServerContainer.getClient().when(request("/")).respond(HttpResponse.response().withStatusCode(200));
+ // Start the mock apm server and expose it to any container as host.testcontainers.internal:$port
+ try {
+ apmServer.start();
+ Testcontainers.exposeHostPorts(apmServer.getPort());
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
}
private final MockReporter mockReporter = new MockReporter();
@@ -150,7 +156,7 @@ protected AbstractServletContainerIntegrationTest(AgentTestContainer.AppServer c
container
.withNetwork(Network.SHARED)
- .withEnv("ELASTIC_APM_SERVER_URL", "http://apm-server:1080")
+ .withEnv("ELASTIC_APM_SERVER_URL", "http://host.testcontainers.internal:" + apmServer.getPort())
.withEnv("ELASTIC_APM_IGNORE_URLS", ignoreUrlConfig)
.withEnv("ELASTIC_APM_REPORT_SYNC", "true")
.withEnv("ELASTIC_APM_LOG_LEVEL", "DEBUG")
@@ -247,7 +253,7 @@ public void testAllScenarios() throws Exception {
}
public void clearMockServerLog() {
- mockServerContainer.getClient().clear(HttpRequest.request(), ClearType.LOG);
+ receivedIntakeEvents.clear();
}
public JsonNode assertTransactionReported(String pathToTest, int expectedResponseCode) {
@@ -268,7 +274,7 @@ public JsonNode assertTransactionReported(String pathToTest, int expectedRespons
}
public void executeAndValidateRequest(String pathToTest, String expectedContent, Integer expectedResponseCode,
- Map headersMap) throws IOException, InterruptedException {
+ Map headersMap) throws IOException, InterruptedException {
final String responseString;
try (Response response = executeRequest(pathToTest, headersMap)) {
if (expectedResponseCode != null) {
@@ -423,23 +429,20 @@ public List getEvents(String eventType) {
try {
final List events = new ArrayList<>();
final ObjectMapper objectMapper = new ObjectMapper();
- for (HttpRequest httpRequest : mockServerContainer.getClient().retrieveRecordedRequests(request(INTAKE_V2_URL))) {
- final String bodyAsString = httpRequest.getBodyAsString();
- for (String ndJsonLine : bodyAsString.split("\n")) {
- final JsonNode ndJson = objectMapper.readTree(ndJsonLine);
- if (ndJson.get(eventType) != null) {
- // as inferred spans are created only after the profiling session ends
- // they can leak into another test
- if (!isInferredSpan(ndJson.get(eventType))) {
- validateEventMetadata(bodyAsString);
- }
- events.add(ndJson.get(eventType));
+ for (String bodyAsString : receivedIntakeEvents) {
+ final JsonNode ndJson = objectMapper.readTree(bodyAsString);
+ if (ndJson.get(eventType) != null) {
+ // as inferred spans are created only after the profiling session ends
+ // they can leak into another test
+ if (!isInferredSpan(ndJson.get(eventType))) {
+ validateEventMetadata(bodyAsString);
}
+ events.add(ndJson.get(eventType));
}
}
return events;
} catch (IOException e) {
- throw new RuntimeException(e);
+ throw new UncheckedIOException(e);
}
}
@@ -458,7 +461,7 @@ private void validateEventMetadata(String bodyAsString) {
}
}
} catch (IOException e) {
- throw new RuntimeException(e);
+ throw new UncheckedIOException(e);
}
}
@@ -509,4 +512,56 @@ private void waitFor(String path) {
public OkHttpClient getHttpClient() {
return httpClient;
}
+
+ /**
+ * This is modeled after {@code co.elastic.apm.awslambda.fakeserver.FakeApmServer}, except
+ * deflate instead of gzip and OkHttp instead of {@code com.sun.net.httpserver.HttpServer}.
+ */
+ private static final class ApmDispatcher extends Dispatcher {
+ @Override
+ public MockResponse dispatch(RecordedRequest request) {
+ switch (request.getPath()) {
+ case "/": // health check
+ return new MockResponse().setBody("{\"version\": \"8.7.1\"}");
+ case INTAKE_V2_URL:
+ case INTAKE_V2_FLUSH_URL:
+ try {
+ readIntakeEvents(request);
+ } catch (IOException e) {
+ logger.error("Encountered intake request error {}", e);
+ return new MockResponse().setResponseCode(500);
+ }
+ return new MockResponse().setResponseCode(202);
+ }
+ logger.error("Encountered unexpected request {}", request);
+ return new MockResponse().setResponseCode(404);
+ }
+ }
+
+ private static void readIntakeEvents(RecordedRequest request) throws IOException {
+ // The request body is compressed with deflate
+ final Buffer body;
+ String encoding = request.getHeader("Content-Encoding");
+ if (encoding == null) {
+ body = request.getBody().buffer();
+ } else if (encoding.contains("deflate")) {
+ Buffer inflated = new Buffer();
+ try (InflaterSource deflated = new InflaterSource(request.getBody(), new Inflater())) {
+ while (deflated.read(inflated, Integer.MAX_VALUE) != -1) ;
+ }
+ body = inflated;
+ } else {
+ throw new IOException("unsupported encoding: " + encoding);
+ }
+
+ // read each Newline Delimited JSON event into the queue.
+ String event;
+ while ((event = body.readUtf8Line()) != null) {
+ if (!event.startsWith("{")) {
+ throw new IOException("not NDJSON " + request);
+ } else {
+ receivedIntakeEvents.add(event);
+ }
+ }
+ }
}
From 0b0082d92686c5ba4fedbc4a251bcefbdbf6b8f8 Mon Sep 17 00:00:00 2001
From: Rafael Winterhalter
Date: Mon, 17 Jun 2024 13:26:09 +0200
Subject: [PATCH 100/132] Remove unused API and resolve naming ambiguities
(#3561)
* Rename implementation versions of interfaces to reflect their state as non-API.
* Merge main branch.
* Fix test imports.
* Fix plugin imports.
* Fix plugin imports.
---
.../AbstractMockApmServerBenchmark.java | 6 +-
.../benchmark/LettuceActiveBenchmark.java | 4 +-
.../benchmark/LettuceNotActiveBenchmark.java | 4 +-
.../apm/agent/benchmark/SizeOfSpan.java | 16 +-
.../objectpool/ObjectPoolBenchmark.java | 48 ++--
.../configuration/ConfigurationExporter.java | 3 +-
.../ConfigurationExporterTest.java | 3 +-
apm-agent-core/README.md | 2 +-
.../apm/agent/bci/ElasticApmAgent.java | 35 ++-
.../bci/bytebuddy/ErrorLoggingListener.java | 4 +-
.../ExternalPluginClassLoader.java | 4 +-
.../ApmServerConfigurationSource.java | 2 +-
...ration.java => CoreConfigurationImpl.java} | 15 +-
...ion.java => MetricsConfigurationImpl.java} | 3 +-
....java => ServerlessConfigurationImpl.java} | 5 +-
.../apm/agent/configuration/StartupInfo.java | 10 +-
.../apm/agent/impl/ActivationListener.java | 18 +-
.../elastic/apm/agent/impl/ActiveStack.java | 46 +--
.../apm/agent/impl/ElasticApmTracer.java | 271 ++++++++++--------
.../agent/impl/ElasticApmTracerBuilder.java | 36 +--
...asticContext.java => EmptyTraceState.java} | 16 +-
.../co/elastic/apm/agent/impl/Tracer.java | 166 -----------
.../apm/agent/impl/TracerConfiguration.java | 4 +-
.../agent/impl/baggage/BaggageContext.java | 24 +-
.../{Baggage.java => BaggageImpl.java} | 27 +-
.../impl/baggage/W3CBaggagePropagation.java | 26 +-
.../apm/agent/impl/baggage/otel/Parser.java | 6 +-
...tContext.java => AbstractContextImpl.java} | 9 +-
.../apm/agent/impl/context/BodyProcessor.java | 20 +-
...{CloudOrigin.java => CloudOriginImpl.java} | 13 +-
.../impl/context/{Db.java => DbImpl.java} | 21 +-
...{Destination.java => DestinationImpl.java} | 28 +-
.../impl/context/{Http.java => HttpImpl.java} | 17 +-
.../{Message.java => MessageImpl.java} | 25 +-
.../{Request.java => RequestImpl.java} | 35 +--
.../{Response.java => ResponseImpl.java} | 15 +-
.../impl/context/SanitizingWebProcessor.java | 22 +-
...viceOrigin.java => ServiceOriginImpl.java} | 13 +-
...viceTarget.java => ServiceTargetImpl.java} | 19 +-
.../context/{Socket.java => SocketImpl.java} | 7 +-
...{SpanContext.java => SpanContextImpl.java} | 20 +-
...ntext.java => TransactionContextImpl.java} | 26 +-
.../impl/context/{Url.java => UrlImpl.java} | 17 +-
.../impl/context/{User.java => UserImpl.java} | 13 +-
...rrorCapture.java => ErrorCaptureImpl.java} | 54 ++--
.../impl/metadata/CloudMetadataProvider.java | 34 +--
.../apm/agent/impl/metadata/MetaData.java | 24 +-
.../metadata/{Node.java => NodeImpl.java} | 6 +-
.../agent/impl/metadata/ServiceFactory.java | 12 +-
.../{Service.java => ServiceImpl.java} | 26 +-
.../apm/agent/impl/metadata/SystemInfo.java | 11 +-
.../agent/impl/sampling/ConstantSampler.java | 4 +-
.../impl/sampling/ProbabilitySampler.java | 8 +-
.../apm/agent/impl/sampling/Sampler.java | 16 +-
....java => StacktraceConfigurationImpl.java} | 3 +-
.../AbstractRefCountedContext.java | 2 +-
...bstractSpan.java => AbstractSpanImpl.java} | 75 ++---
.../impl/transaction/DroppedSpanStats.java | 18 +-
.../impl/transaction/EpochTickClock.java | 2 +-
.../transaction/{Faas.java => FaasImpl.java} | 19 +-
...{FaasTrigger.java => FaasTriggerImpl.java} | 9 +-
.../impl/transaction/{Id.java => IdImpl.java} | 17 +-
.../impl/transaction/SpanAtomicReference.java | 6 +-
.../transaction/{Span.java => SpanImpl.java} | 85 +++---
...raceContext.java => TraceContextImpl.java} | 95 +++---
.../agent/impl/transaction/TraceState.java | 2 +-
...lasticContext.java => TraceStateImpl.java} | 35 +--
...extWrapper.java => TraceStateWrapper.java} | 26 +-
...{Transaction.java => TransactionImpl.java} | 67 ++---
.../transaction/UniqueSpanLinkArrayList.java | 20 +-
.../agent/logging/ApmServerLogAppender.java | 6 +-
.../logging/Log4j2ConfigurationFactory.java | 26 +-
...ion.java => LoggingConfigurationImpl.java} | 5 +-
.../apm/agent/metrics/MetricRegistry.java | 14 +-
.../elastic/apm/agent/metrics/MetricSet.java | 3 +-
.../metrics/builtin/AgentOverheadMetrics.java | 6 +-
.../metrics/builtin/AgentReporterMetrics.java | 4 +-
...bjectHandle.java => ObjectHandleImpl.java} | 20 +-
...actory.java => ObjectPoolFactoryImpl.java} | 54 ++--
...ectPool.java => ObservableObjectPool.java} | 2 +-
.../objectpool/impl/AbstractObjectPool.java | 4 +-
.../report/AbstractIntakeApiHandler.java | 4 +-
.../apm/agent/report/ApmServerClient.java | 16 +-
.../apm/agent/report/ApmServerReporter.java | 42 +--
.../report/IntakeV2ReportingEventHandler.java | 2 +-
.../report/PartialTransactionReporter.java | 12 +-
.../co/elastic/apm/agent/report/Reporter.java | 14 +-
...on.java => ReporterConfigurationImpl.java} | 7 +-
.../apm/agent/report/ReporterFactory.java | 12 +-
.../apm/agent/report/ReportingEvent.java | 24 +-
.../apm/agent/report/processor/Processor.java | 14 +-
.../report/serialize/DslJsonSerializer.java | 134 ++++-----
.../serialize/MetricRegistryReporter.java | 4 +-
.../serialize/SerializationConstants.java | 4 +-
.../TraceMethodInstrumentation.java | 24 +-
.../ProfilerSharedMemoryWriter.java | 8 +-
.../SpanProfilingSamplesCorrelator.java | 22 +-
.../UniversalProfilingIntegration.java | 31 +-
.../co/elastic/apm/agent/util/ThreadDump.java | 4 +-
...al.pooling.ObjectPooling$ObjectPoolFactory | 2 +-
....configuration.ConfigurationOptionProvider | 12 +-
.../agent/AbstractInstrumentationTest.java | 14 +-
.../co/elastic/apm/agent/MockReporter.java | 100 +++----
.../elastic/apm/agent/TransactionUtils.java | 44 +--
.../apm/agent/bci/InstrumentationTest.java | 16 +-
...eferencedCountedConcurrentHashMapTest.java | 22 +-
.../ApmServerConfigurationSourceTest.java | 6 +-
.../configuration/CoreConfigurationTest.java | 30 +-
.../agent/configuration/StartupInfoTest.java | 10 +-
.../apm/agent/impl/DiscardSpanTest.java | 50 ++--
.../impl/ElasticApmTracerBuilderTest.java | 14 +-
.../impl/ElasticApmTracerShutdownTest.java | 4 +-
.../apm/agent/impl/ElasticApmTracerTest.java | 151 +++++-----
.../elastic/apm/agent/impl/LifecycleTest.java | 6 +-
.../apm/agent/impl/SpanTypeBreakdownTest.java | 58 ++--
.../impl/baggage/BaggageBuilderTest.java | 16 +-
.../baggage/W3CBaggagePropagationTest.java | 18 +-
.../circuitbreaker/CircuitBreakerTest.java | 4 +-
.../agent/impl/context/BodyProcessorTest.java | 56 ++--
.../agent/impl/context/DestinationTest.java | 18 +-
.../apm/agent/impl/context/MessageTest.java | 10 +-
.../context/SanitizingWebProcessorTest.java | 14 +-
.../impl/context/ServiceResourceTest.java | 20 +-
.../agent/impl/context/ServiceTargetTest.java | 38 +--
.../impl/context/TransactionContextTest.java | 18 +-
.../apm/agent/impl/context/UrlTest.java | 30 +-
.../apm/agent/impl/metadata/MetaDataMock.java | 6 +-
.../apm/agent/impl/metadata/MetaDataTest.java | 34 +--
.../agent/impl/metadata/SystemInfoTest.java | 6 +-
.../impl/sampling/ProbabilitySamplerTest.java | 8 +-
.../StacktraceConfigurationTest.java | 10 +-
.../AbstractCompressionStrategyTest.java | 76 ++---
.../agent/impl/transaction/BaggageTest.java | 64 ++---
.../ExactMatchCompressionStrategyTest.java | 6 +-
.../impl/transaction/FastExitSpanTest.java | 24 +-
.../apm/agent/impl/transaction/IdTest.java | 8 +-
.../SameKindCompressionStrategyTest.java | 6 +-
.../impl/transaction/SpanCompressionIT.java | 16 +-
.../apm/agent/impl/transaction/SpanTest.java | 38 +--
.../impl/transaction/TraceContextTest.java | 212 +++++++-------
.../impl/transaction/TraceContextW3CTest.java | 2 +-
.../TraceContinuationStrategyTest.java | 26 +-
.../impl/transaction/TransactionTest.java | 28 +-
.../logging/ApmServerLogAppenderTest.java | 4 +-
.../logging/LoggingConfigurationTest.java | 2 +-
.../apm/agent/metrics/MetricRegistryTest.java | 12 +-
.../builtin/AgentOverheadMetricsTest.java | 12 +-
.../builtin/AgentReporterMetricsTest.java | 12 +-
.../metrics/builtin/CGroupMetricsTest.java | 6 +-
.../metrics/builtin/JvmFdMetricsTest.java | 8 +-
.../metrics/builtin/JvmMemoryMetricsTest.java | 6 +-
.../metrics/builtin/SystemMetricsTest.java | 6 +-
.../metrics/builtin/ThreadMetricsTest.java | 6 +-
.../apm/agent/objectpool/ObjectPoolTest.java | 2 +-
.../objectpool/TestObjectPoolFactory.java | 46 +--
.../objectpool/impl/BookkeeperObjectPool.java | 12 +-
.../impl/BookkeeperObjectPoolTest.java | 4 +-
.../impl/QueueBasedObjectPoolTest.java | 4 +-
.../report/ApmServerClientProxySupportIT.java | 2 +-
.../apm/agent/report/ApmServerClientTest.java | 34 +--
.../ApmServerReporterIntegrationTest.java | 56 ++--
.../IntakeV2ReportingEventHandlerTest.java | 30 +-
.../agent/report/PartialTransactionTest.java | 24 +-
.../apm/agent/report/ReporterFactoryTest.java | 22 +-
.../apm/agent/report/TestProcessor.java | 8 +-
.../serialize/DslJsonSerializerTest.java | 198 +++++++------
.../serialize/MetricSetSerializationTest.java | 6 +-
.../serialize/SerializationConstantsTest.java | 4 +-
.../assertions/AbstractSpanAssert.java | 16 +-
.../testutils/assertions/Assertions.java | 28 +-
.../testutils/assertions/BaggageAssert.java | 6 +-
.../agent/testutils/assertions/DbAssert.java | 6 +-
.../assertions/DestinationAssert.java | 6 +-
.../assertions/ElasticContextAssert.java | 4 +-
.../assertions/ServiceTargetAssert.java | 6 +-
.../testutils/assertions/SpanAssert.java | 6 +-
.../TraceMethodInstrumentationTest.java | 16 +-
.../UniversalProfilingIntegrationTest.java | 52 ++--
.../example/stacktrace/ErrorCaptureTest.java | 60 ++--
.../StacktraceSerializationTest.java | 14 +-
.../java/specs/OutcomeStepsDefinitions.java | 16 +-
.../src/test/java/specs/ScenarioState.java | 20 +-
.../sdk/bytebuddy/MethodHierarchyMatcher.java | 2 +-
.../AbstractApacheHttpClientAdvice.java | 8 +-
.../AbstractApacheHttpClientAsyncAdvice.java | 6 +-
.../common/ApacheHttpClientAsyncHelper.java | 4 +-
.../v3/HttpClient3Instrumentation.java | 4 +-
...LegacyApacheHttpClientInstrumentation.java | 4 +-
.../helper/ApacheHttpClient4AsyncHelper.java | 4 +-
.../HttpAsyncRequestProducerWrapper.java | 6 +-
...cheHttpAsyncClientInstrumentationTest.java | 4 +-
.../helper/ApacheHttpClient5AsyncHelper.java | 6 +-
.../helper/AsyncRequestProducerWrapper.java | 6 +-
.../v5/helper/RequestChannelWrapper.java | 6 +-
...cheHttpAsyncClientInstrumentationTest.java | 6 +-
apm-agent-plugins/apm-api-plugin/pom.xml | 1 -
.../AbstractSpanInstrumentation.java | 106 +++----
.../pluginapi/ApiScopeInstrumentation.java | 6 +-
.../pluginapi/CaptureSpanInstrumentation.java | 13 +-
.../CaptureTransactionInstrumentation.java | 6 +-
.../ElasticApmApiInstrumentation.java | 6 +-
.../pluginapi/LegacySpanInstrumentation.java | 9 +-
.../pluginapi/TracedInstrumentation.java | 10 +-
.../pluginapi/TransactionInstrumentation.java | 40 ++-
.../pluginapi/ConfigInstrumentationTest.java | 7 +-
.../pluginapi/SpanInstrumentationTest.java | 20 +-
.../apm/api/AbstractSpanImplAccessor.java | 4 +-
.../co/elastic/apm/api/AnnotationApiTest.java | 6 +-
.../apm/api/AnnotationInheritanceTest.java | 4 +-
.../BlockingQueueContextPropagationTest.java | 8 +-
.../api/ElasticApmApiInstrumentationTest.java | 28 +-
.../apm/api/SpanDestinationApiTest.java | 9 +-
.../elastic/apm/api/SpanDiscardingTest.java | 7 +-
.../java/co/elastic/apm/api/SpanExitTest.java | 22 +-
...bstractAsyncHttpClientInstrumentation.java | 4 +-
.../apm/agent/awssdk/v1/helper/SQSHelper.java | 4 +-
.../apm/agent/awssdk/v1/DynamoDbClientIT.java | 11 +-
.../apm/agent/awssdk/v1/S3ClientIT.java | 5 +-
.../apm/agent/awssdk/v1/SQSClientIT.java | 16 +-
.../apm/agent/awssdk/v1/SQSJmsClientIT.java | 42 ++-
.../apm/agent/awssdk/v2/helper/SQSHelper.java | 6 +-
...eSyncClientHandlerInstrumentationTest.java | 8 +-
.../apm/agent/awssdk/v2/DynamoDbClientIT.java | 13 +-
.../apm/agent/awssdk/v2/S3ClientIT.java | 7 +-
.../apm/agent/awssdk/v2/SQSClientIT.java | 22 +-
.../apm/agent/awssdk/v2/SQSJmsClientIT.java | 42 ++-
.../awssdk/common/AbstractAwsClientIT.java | 20 +-
.../awssdk/common/AbstractSQSClientIT.java | 56 ++--
.../agent/awslambda/AbstractLambdaTest.java | 29 +-
.../awslambda/AbstractPlainLambdaTest.java | 8 +-
.../AbstractStreamHandlerLambdaTest.java | 10 +-
.../awslambda/ApiGatewayV1LambdaTest.java | 30 +-
.../awslambda/ApiGatewayV2LambdaTest.java | 32 +--
...ionLoadBalancerRequestEventLambdaTest.java | 32 +--
.../awslambda/BaseGatewayLambdaTest.java | 10 +-
.../agent/awslambda/S3EventLambdaTest.java | 18 +-
.../agent/awslambda/SNSEventLambdaTest.java | 30 +-
.../agent/awslambda/SQSEventLambdaTest.java | 30 +-
.../Cassandra3InstrumentationIT.java | 12 +-
.../Cassandra4InstrumentationIT.java | 12 +-
.../AbstractDubboInstrumentationTest.java | 40 +--
.../AlibabaDubboInstrumentationTest.java | 18 +-
.../dubbo/ApacheDubboInstrumentationTest.java | 34 +--
.../agent/ecs_logging/EcsLoggingUtils.java | 4 +-
.../EcsServiceEnvironmentTest.java | 4 +-
.../agent/ecs_logging/EcsServiceNameTest.java | 4 +-
.../ecs_logging/EcsServiceVersionTest.java | 4 +-
.../jul/JulEcsMdcInstrumentationTest.java | 8 +-
...sticsearchRestClientInstrumentationIT.java | 6 +-
...bstractEs6_4ClientInstrumentationTest.java | 6 +-
...tClientInstrumentationIT_RealReporter.java | 32 +--
...sticsearchRestClientInstrumentationIT.java | 14 +-
.../v8_x/Elasticsearch8JavaIT.java | 14 +-
.../AbstractEsClientInstrumentationTest.java | 32 +--
...chRestClientInstrumentationHelperTest.java | 24 +-
...naglePayloadSizeFilterInstrumentation.java | 5 +-
.../FinagleHttpClientTest.java | 8 +-
...ilsTransactionNameInstrumentationTest.java | 4 +-
.../co/elastic/apm/agent/grpc/GrpcHelper.java | 6 +-
...AbstractGrpcClientInstrumentationTest.java | 20 +-
.../grpc/AbstractGrpcContextHeadersTest.java | 18 +-
...AbstractGrpcServerInstrumentationTest.java | 14 +-
.../HibernateSearchHelper.java | 4 +-
.../HibernateSearchAssertionHelper.java | 4 +-
.../agent/httpclient/HttpClientHelper.java | 6 +-
...AbstractHttpClientInstrumentationTest.java | 47 ++-
.../httpclient/HttpClientHelperTest.java | 24 +-
...BaseServerEndpointInstrumentationTest.java | 12 +-
.../apm/agent/concurrent/JavaConcurrent.java | 16 +-
...leCallableForkJoinTaskInstrumentation.java | 5 +-
.../AsyncTraceMethodInstrumentationTest.java | 8 +-
.../concurrent/ExcludedExecutorClassTest.java | 4 +-
.../ExecutorInstrumentationTest.java | 20 +-
.../ExecutorServiceDoubleWrappingTest.java | 10 +-
.../ExecutorServiceInstrumentationTest.java | 32 +--
.../agent/concurrent/ForkJoinPoolTest.java | 12 +-
.../ScheduledExecutorServiceTest.java | 14 +-
.../agent/concurrent/ScopeManagementTest.java | 24 +-
.../agent/java_ldap/LdapClientAdviceTest.java | 18 +-
.../javalin/JavalinInstrumentationTest.java | 16 +-
...xRsTransactionNameInstrumentationTest.java | 4 +-
...xRsTransactionNameInstrumentationTest.java | 4 +-
...nsactionNameInstrumentationTestHelper.java | 36 +--
.../AbstractJaxWsInstrumentationTest.java | 4 +-
.../apm/agent/jdbc/helper/JdbcHelper.java | 4 +-
.../jdbc/AbstractJdbcInstrumentationTest.java | 30 +-
.../jdbc/helper/ConnectionMetaDataTest.java | 4 +-
.../apm/agent/httpserver/HttpHandlerTest.java | 24 +-
.../jms/jakarta/JmsInstrumentationIT.java | 76 ++---
.../jms/jakarta/JmsMessageListenerTest.java | 21 +-
.../JmsMessagePropertyAccessorTest.java | 6 +-
.../java/testapp/TestMessageListener.java | 10 +-
.../src/test/java/testapp/TestMsgHandler.java | 10 +-
.../agent/jms/javax/JmsInstrumentationIT.java | 76 ++---
.../jms/javax/JmsMessageListenerTest.java | 21 +-
.../javax/JmsMessagePropertyAccessorTest.java | 6 +-
.../java/testapp/TestMessageListener.java | 10 +-
.../src/test/java/testapp/TestMsgHandler.java | 10 +-
.../agent/jms/JmsInstrumentationHelper.java | 4 +-
.../agent/jms/javax/spring/SpringJmsTest.java | 22 +-
.../spring/SpringMapMessageListener.java | 4 +-
...actJsfLifecycleExecuteInstrumentation.java | 4 +-
...ractJsfLifecycleRenderInstrumentation.java | 4 +-
.../kafka/KafkaConsumerInstrumentation.java | 4 +-
.../apm/agent/kafka/KafkaLegacyClientIT.java | 44 +--
.../KafkaInstrumentationHeadersHelper.java | 4 +-
.../co/elastic/apm/agent/kafka/KafkaIT.java | 82 +++---
.../apm/agent/kafka/KafkaIT_RealReporter.java | 20 +-
.../apm/agent/kafka/KafkaLegacyBrokerIT.java | 64 ++---
.../apm/agent/kafka/KafkaSpringIT.java | 28 +-
...ManagerCorrelationInstrumentationTest.java | 14 +-
...LoggingCorrelationInstrumentationTest.java | 14 +-
.../log4j2/Log4j2InstrumentationTest.java | 6 +-
.../Log4j2InstrumentationTestVersions.java | 4 +-
.../AbstractEcsReformattingHelper.java | 3 -
.../loginstr/LoggingInstrumentationTest.java | 26 +-
.../CorrelationIdMapAdapterTest.java | 10 +-
...stractErrorLoggingInstrumentationTest.java | 4 +-
.../loginstr/reformatting/UtilsTest.java | 6 +-
.../MicrometerConfigInstrumentationTest.java | 8 +-
.../MicrometerInstrumentationStepTest.java | 6 +-
.../MicrometerInstrumentationTest.java | 8 +-
...MicrometerMeterRegistrySerializerTest.java | 4 +-
.../MicrometerMetricsReporterTest.java | 14 +-
.../AbstractMongoClientInstrumentationIT.java | 13 +-
.../OkHttp3ClientAsyncInstrumentation.java | 4 +-
.../okhttp/OkHttp3ClientInstrumentation.java | 4 +-
.../OkHttpClientAsyncInstrumentation.java | 4 +-
.../okhttp/OkHttpClientInstrumentation.java | 4 +-
.../proxy/ProxyDoubleHistogramBuilder.java | 4 +-
.../proxy/ProxyLongHistogramBuilder.java | 4 +-
.../AbstractOtelMetricsTest.java | 20 +-
.../otelmetricsdk/MetricExportTimingTest.java | 4 +-
.../PrivateUserSdkOtelMetricsTest.java | 4 +-
.../WithSpanInstrumentation.java | 14 +-
.../opentelemetry/baggage/OtelBaggage.java | 13 +-
.../context/OTelContextStorage.java | 4 +-
.../tracing/OTelBridgeContext.java | 18 +-
.../agent/opentelemetry/tracing/OTelSpan.java | 35 +--
.../tracing/OTelSpanBuilder.java | 20 +-
.../tracing/OTelSpanContext.java | 8 +-
.../EmbeddedMetricSDKShutdownTest.java | 4 +-
.../ElasticOpenTelemetryAnnotationsTest.java | 15 +-
.../tracing/ElasticOpenTelemetryTest.java | 51 ++--
.../tracing/OTelSpanDiscardingTest.java | 7 +-
.../tracing/OTelSpanLinkTest.java | 8 +-
.../specs/OTelBridgeStepsDefinitions.java | 43 ++-
apm-agent-plugins/apm-opentelemetry/pom.xml | 1 -
.../apm-opentracing-plugin/pom.xml | 1 -
.../ApmScopeInstrumentation.java | 6 +-
.../ApmSpanBuilderInstrumentation.java | 32 +--
.../ApmSpanInstrumentation.java | 42 +--
.../ElasticApmTracerInstrumentation.java | 4 +-
.../ExternalSpanContextInstrumentation.java | 14 +-
.../ScopeManagerInstrumentation.java | 6 +-
.../SpanContextInstrumentation.java | 18 +-
.../apm/agent/process/ProcessHelper.java | 6 +-
.../process/ProcessStartInstrumentation.java | 4 +-
.../CommonsExecAsyncInstrumentationTest.java | 12 +-
.../apm/agent/process/ProcessHelperTest.java | 16 +-
.../apm-profiling-plugin/pom.xml | 1 -
.../elastic/apm/agent/profiler/CallTree.java | 53 ++--
.../profiler/ProfilingActivationListener.java | 10 +-
.../apm/agent/profiler/SamplingProfiler.java | 48 ++--
.../agent/profiler/CallTreeSpanifyTest.java | 28 +-
.../apm/agent/profiler/CallTreeTest.java | 47 ++-
.../profiler/SamplingProfilerQueueTest.java | 8 +-
.../profiler/SamplingProfilerReplay.java | 3 +-
.../agent/profiler/SamplingProfilerTest.java | 26 +-
...JobTransactionNameInstrumentationTest.java | 14 +-
...JobTransactionNameInstrumentationTest.java | 8 +-
...JobTransactionNameInstrumentationTest.java | 8 +-
.../rabbitmq/ChannelInstrumentation.java | 4 +-
.../apm/agent/rabbitmq/RabbitMQIT.java | 108 ++++---
.../agent/rabbitmq/AbstractRabbitMqTest.java | 33 ++-
.../elastic/apm/agent/rabbitmq/FanoutIT.java | 12 +-
.../apm/agent/rabbitmq/SpringAmqpBatchIT.java | 44 +--
.../apm/agent/reactor/TracedSubscriber.java | 28 +-
.../agent/reactor/TracedSubscriberTest.java | 18 +-
.../AbstractRedisInstrumentationTest.java | 26 +-
.../FutureInstrumentation.java | 11 +-
.../FutureInstrumentationSpec.scala | 6 +-
.../AbstractScheduledInstrumentationTest.java | 12 +-
...ledTransactionNameInstrumentationTest.java | 8 +-
...ledTransactionNameInstrumentationTest.java | 8 +-
.../TimerTaskInstrumentationTest.java | 10 +-
.../servlet/JakartaAsyncServletTest.java | 8 +-
.../JakartaServletInstrumentationTest.java | 14 +-
.../apm/agent/servlet/ServletApiAdvice.java | 4 +-
.../servlet/ServletServiceNameHelper.java | 8 +-
.../apm/agent/servlet/ApmFilterTest.java | 26 +-
.../apm/agent/servlet/AsyncServletTest.java | 8 +-
.../InitServiceNameInstrumentationTest.java | 4 +-
.../servlet/ServletInstrumentationTest.java | 16 +-
.../servlet/ServletTransactionHelperTest.java | 10 +-
.../servlet/TestRequestBodyCapturing.java | 28 +-
.../apm/agent/sparkjava/RoutesAdviceTest.java | 4 +-
.../agent/resttemplate/FeignClientTest.java | 12 +-
.../SprintRestTemplateIntegration.java | 12 +-
...ClientExchangeFunctionInstrumentation.java | 5 +-
.../TransactionAwareSubscriber.java | 4 +-
.../AbstractServerInstrumentationTest.java | 38 +--
.../springwebflux/ServletContainerTest.java | 4 +-
.../apm-spring-webflux-testapp/pom.xml | 6 +
.../testapp/GreetingAnnotated.java | 9 +-
.../testapp/GreetingFunctional.java | 9 +-
apm-agent-plugins/apm-spring-webflux/pom.xml | 6 -
...tractSpringServiceNameInstrumentation.java | 10 +-
...ingTransactionNameInstrumentationTest.java | 4 +-
...ctExceptionHandlerInstrumentationTest.java | 4 +-
...trumentationWithExceptionResolverTest.java | 4 +-
...strumentationWithExceptionHandlerTest.java | 4 +-
...erInstrumentationWithGlobalAdviceTest.java | 4 +-
...tractViewRenderingInstrumentationTest.java | 4 +-
.../apm/agent/struts/ActionProxyAdvice.java | 4 +-
.../agent/struts/ActionProxyAdviceTest.java | 12 +-
.../HttpUrlConnectionInstrumentation.java | 5 +-
.../HttpUrlConnectionInstrumentationTest.java | 12 +-
.../vertx/AbstractVertxWebClientHelper.java | 12 +-
.../agent/vertx/GenericHandlerWrapper.java | 8 +-
.../apm/agent/vertx/SetTimerWrapper.java | 6 +-
.../vertx/helper/AbstractVertxWebTest.java | 14 +-
.../helper/CommonVertxServerClientTest.java | 24 +-
.../vertx/helper/CommonVertxWebTest.java | 64 ++---
.../helper/HandlerWithCustomNamedSpan.java | 8 +-
.../webclient/AbstractVertxWebClientTest.java | 8 +-
.../webclient/HttpContextInstrumentation.java | 8 +-
.../agent/tracer/BaggageContextBuilder.java | 2 +-
.../apm/agent/tracer/GlobalTracer.java | 22 +-
...lasticContext.java => NoopTraceState.java} | 8 +-
.../elastic/apm/agent/tracer/NoopTracer.java | 22 +-
.../{ElasticContext.java => TraceState.java} | 4 +-
.../co/elastic/apm/agent/tracer/Tracer.java | 25 +-
.../StacktraceConfiguration.java | 1 +
.../tracer/service/ServiceAwareTracer.java | 33 ---
.../opentracing/OpenTracingBridgeTest.java | 67 ++---
docs/troubleshooting.asciidoc | 8 +-
.../servlet/tests/ExternalPluginTestApp.java | 3 +-
.../plugin/PluginInstrumentationTest.java | 10 +-
.../apm/spring/boot/SpringBoot1_5IT.java | 6 +-
.../spring/boot/AbstractSpringBootTest.java | 8 +-
441 files changed, 4126 insertions(+), 4300 deletions(-)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/{CoreConfiguration.java => CoreConfigurationImpl.java} (98%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/{MetricsConfiguration.java => MetricsConfigurationImpl.java} (97%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/{ServerlessConfiguration.java => ServerlessConfigurationImpl.java} (92%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/{EmptyElasticContext.java => EmptyTraceState.java} (73%)
delete mode 100644 apm-agent-core/src/main/java/co/elastic/apm/agent/impl/Tracer.java
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/{Baggage.java => BaggageImpl.java} (89%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{AbstractContext.java => AbstractContextImpl.java} (89%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{CloudOrigin.java => CloudOriginImpl.java} (83%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Db.java => DbImpl.java} (88%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Destination.java => DestinationImpl.java} (84%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Http.java => HttpImpl.java} (83%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Message.java => MessageImpl.java} (82%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Request.java => RequestImpl.java} (86%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Response.java => ResponseImpl.java} (85%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{ServiceOrigin.java => ServiceOriginImpl.java} (83%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{ServiceTarget.java => ServiceTargetImpl.java} (87%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Socket.java => SocketImpl.java} (85%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{SpanContext.java => SpanContextImpl.java} (77%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{TransactionContext.java => TransactionContextImpl.java} (81%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{Url.java => UrlImpl.java} (94%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/{User.java => UserImpl.java} (87%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/{ErrorCapture.java => ErrorCaptureImpl.java} (83%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/{Node.java => NodeImpl.java} (90%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/{Service.java => ServiceImpl.java} (86%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/{StacktraceConfiguration.java => StacktraceConfigurationImpl.java} (97%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{AbstractSpan.java => AbstractSpanImpl.java} (90%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{Faas.java => FaasImpl.java} (82%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{FaasTrigger.java => FaasTriggerImpl.java} (84%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{Id.java => IdImpl.java} (94%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{Span.java => SpanImpl.java} (88%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{TraceContext.java => TraceContextImpl.java} (89%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{ElasticContext.java => TraceStateImpl.java} (79%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{ElasticContextWrapper.java => TraceStateWrapper.java} (82%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/{Transaction.java => TransactionImpl.java} (89%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/logging/{LoggingConfiguration.java => LoggingConfigurationImpl.java} (98%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/{ObjectHandle.java => ObjectHandleImpl.java} (67%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/{ObjectPoolFactory.java => ObjectPoolFactoryImpl.java} (54%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/{ObjectPool.java => ObservableObjectPool.java} (87%)
rename apm-agent-core/src/main/java/co/elastic/apm/agent/report/{ReporterConfiguration.java => ReporterConfigurationImpl.java} (97%)
rename apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/{NoopElasticContext.java => NoopTraceState.java} (91%)
rename apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/{ElasticContext.java => TraceState.java} (97%)
delete mode 100644 apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/service/ServiceAwareTracer.java
diff --git a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/AbstractMockApmServerBenchmark.java b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/AbstractMockApmServerBenchmark.java
index de5de5b823..10e42b5749 100644
--- a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/AbstractMockApmServerBenchmark.java
+++ b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/AbstractMockApmServerBenchmark.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.benchmark;
import co.elastic.apm.agent.bci.ElasticApmAgent;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.ElasticApmTracerBuilder;
import io.undertow.Undertow;
@@ -79,8 +79,8 @@ public void setUp(Blackhole blackhole) throws IOException {
tracer = new ElasticApmTracerBuilder()
.configurationRegistry(ConfigurationRegistry.builder()
.addConfigSource(new SimpleSource()
- .add(CoreConfiguration.SERVICE_NAME, "benchmark")
- .add(CoreConfiguration.INSTRUMENT, Boolean.toString(apmEnabled))
+ .add(CoreConfigurationImpl.SERVICE_NAME, "benchmark")
+ .add(CoreConfigurationImpl.INSTRUMENT, Boolean.toString(apmEnabled))
.add("active", Boolean.toString(apmEnabled))
.add("api_request_size", "10mb")
.add("capture_headers", "false")
diff --git a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceActiveBenchmark.java b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceActiveBenchmark.java
index 043babcc31..c970d16ee2 100644
--- a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceActiveBenchmark.java
+++ b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceActiveBenchmark.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.benchmark;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.runner.RunnerException;
@@ -34,7 +34,7 @@ public LettuceActiveBenchmark() {
@Benchmark
public String benchmarkLettuce() {
- Transaction transaction = tracer.startRootTransaction(null).withName("transaction").activate();
+ TransactionImpl transaction = tracer.startRootTransaction(null).withName("transaction").activate();
try {
return sync.get("foo");
} finally {
diff --git a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceNotActiveBenchmark.java b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceNotActiveBenchmark.java
index 1b1249d51e..7e5c5bec5b 100644
--- a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceNotActiveBenchmark.java
+++ b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/LettuceNotActiveBenchmark.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.benchmark;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.runner.RunnerException;
@@ -36,7 +36,7 @@ public LettuceNotActiveBenchmark() {
@Threads(4)
@Benchmark
public String benchmarkLettuce() {
- Transaction transaction = tracer.startRootTransaction(null).withName("transaction").activate();
+ TransactionImpl transaction = tracer.startRootTransaction(null).withName("transaction").activate();
try {
return sync.get("foo");
} finally {
diff --git a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/SizeOfSpan.java b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/SizeOfSpan.java
index 13795b1d4e..5c9e9c6cb8 100644
--- a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/SizeOfSpan.java
+++ b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/SizeOfSpan.java
@@ -20,10 +20,10 @@
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.ElasticApmTracerBuilder;
-import co.elastic.apm.agent.impl.error.ErrorCapture;
-import co.elastic.apm.agent.impl.transaction.Span;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.impl.error.ErrorCaptureImpl;
+import co.elastic.apm.agent.impl.transaction.SpanImpl;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
+import co.elastic.apm.agent.report.ReporterConfigurationImpl;
import co.elastic.apm.agent.util.MathUtils;
import org.ehcache.sizeof.SizeOf;
@@ -32,15 +32,15 @@ public class SizeOfSpan {
public static void main(String[] args) {
final SizeOf sizeOf = SizeOf.newInstance();
ElasticApmTracer tracer = new ElasticApmTracerBuilder().buildAndStart();
- final long sizeOfSpan = sizeOf.deepSizeOf(new Span(tracer));
- final long sizeOfTransaction = sizeOf.deepSizeOf(new Transaction(tracer));
- final long sizeOfError = sizeOf.deepSizeOf(new ErrorCapture(tracer));
+ final long sizeOfSpan = sizeOf.deepSizeOf(new SpanImpl(tracer));
+ final long sizeOfTransaction = sizeOf.deepSizeOf(new TransactionImpl(tracer));
+ final long sizeOfError = sizeOf.deepSizeOf(new ErrorCaptureImpl(tracer));
System.out.println("sizeof span: " + sizeOfSpan);
System.out.println("sizeof transaction: " + sizeOfTransaction);
System.out.println("sizeof error: " + sizeOfError);
- final int queueSize = MathUtils.getNextPowerOf2(new ReporterConfiguration().getMaxQueueSize());
+ final int queueSize = MathUtils.getNextPowerOf2(new ReporterConfigurationImpl().getMaxQueueSize());
final long sizeOfObjectPools = queueSize * 2 * sizeOfSpan +
queueSize * 2 * sizeOfTransaction +
queueSize * sizeOfError;
diff --git a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/objectpool/ObjectPoolBenchmark.java b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/objectpool/ObjectPoolBenchmark.java
index d1742cf30a..43850b3d1e 100644
--- a/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/objectpool/ObjectPoolBenchmark.java
+++ b/apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/objectpool/ObjectPoolBenchmark.java
@@ -21,8 +21,8 @@
import co.elastic.apm.agent.benchmark.AbstractBenchmark;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.ElasticApmTracerBuilder;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.objectpool.ObjectPool;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool;
import co.elastic.apm.agent.objectpool.impl.ThreadLocalObjectPool;
import org.agrona.concurrent.ManyToManyConcurrentArrayQueue;
@@ -45,11 +45,11 @@
public class ObjectPoolBenchmark extends AbstractBenchmark {
private ElasticApmTracer tracer;
- private ObjectPool blockingQueueObjectPool;
- private ObjectPool agronaQueueObjectPool;
- private ObjectPool threadLocalObjectPool;
- private ObjectPool jctoolsQueueObjectPool;
- private ObjectPool jctoolsAtomicQueueObjectPool;
+ private ObservableObjectPool blockingQueueObjectPool;
+ private ObservableObjectPool agronaQueueObjectPool;
+ private ObservableObjectPool threadLocalObjectPool;
+ private ObservableObjectPool jctoolsQueueObjectPool;
+ private ObservableObjectPool jctoolsAtomicQueueObjectPool;
public static void main(String[] args) throws RunnerException {
run(ObjectPoolBenchmark.class);
@@ -58,11 +58,11 @@ public static void main(String[] args) throws RunnerException {
@Setup
public void setUp() {
tracer = new ElasticApmTracerBuilder().buildAndStart();
- blockingQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new ArrayBlockingQueue<>(256), true, () -> new Transaction(tracer));
- jctoolsQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcArrayQueue<>(256), true, () -> new Transaction(tracer));
- jctoolsAtomicQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcAtomicArrayQueue<>(256), true, () -> new Transaction(tracer));
- agronaQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new ManyToManyConcurrentArrayQueue<>(256), true, () -> new Transaction(tracer));
- threadLocalObjectPool = new ThreadLocalObjectPool<>(64, true, () -> new Transaction(tracer));
+ blockingQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new ArrayBlockingQueue<>(256), true, () -> new TransactionImpl(tracer));
+ jctoolsQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcArrayQueue<>(256), true, () -> new TransactionImpl(tracer));
+ jctoolsAtomicQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcAtomicArrayQueue<>(256), true, () -> new TransactionImpl(tracer));
+ agronaQueueObjectPool = QueueBasedObjectPool.ofRecyclable(new ManyToManyConcurrentArrayQueue<>(256), true, () -> new TransactionImpl(tracer));
+ threadLocalObjectPool = new ThreadLocalObjectPool<>(64, true, () -> new TransactionImpl(tracer));
}
@TearDown
@@ -72,46 +72,46 @@ public void tearDown() {
// @Benchmark
@Threads(8)
- public Transaction testNewOperator() {
- return new Transaction(tracer);
+ public TransactionImpl testNewOperator() {
+ return new TransactionImpl(tracer);
}
@Benchmark
@Threads(8)
- public Transaction testJctoolsAtomicQueueObjectPool() {
- Transaction transaction = jctoolsAtomicQueueObjectPool.createInstance();
+ public TransactionImpl testJctoolsAtomicQueueObjectPool() {
+ TransactionImpl transaction = jctoolsAtomicQueueObjectPool.createInstance();
jctoolsAtomicQueueObjectPool.recycle(transaction);
return transaction;
}
// @Benchmark
@Threads(8)
- public Transaction testArgonaQueueObjectPool() {
- Transaction transaction = agronaQueueObjectPool.createInstance();
+ public TransactionImpl testArgonaQueueObjectPool() {
+ TransactionImpl transaction = agronaQueueObjectPool.createInstance();
agronaQueueObjectPool.recycle(transaction);
return transaction;
}
@Benchmark
@Threads(8)
- public Transaction testJctoolsQueueObjectPool() {
- Transaction transaction = jctoolsQueueObjectPool.createInstance();
+ public TransactionImpl testJctoolsQueueObjectPool() {
+ TransactionImpl transaction = jctoolsQueueObjectPool.createInstance();
jctoolsQueueObjectPool.recycle(transaction);
return transaction;
}
//@Benchmark
@Threads(8)
- public Transaction testBlockingQueueObjectPool() {
- Transaction transaction = blockingQueueObjectPool.createInstance();
+ public TransactionImpl testBlockingQueueObjectPool() {
+ TransactionImpl transaction = blockingQueueObjectPool.createInstance();
blockingQueueObjectPool.recycle(transaction);
return transaction;
}
// @Benchmark
@Threads(8)
- public Transaction testThreadLocalObjectPool() {
- Transaction transaction = threadLocalObjectPool.createInstance();
+ public TransactionImpl testThreadLocalObjectPool() {
+ TransactionImpl transaction = threadLocalObjectPool.createInstance();
threadLocalObjectPool.recycle(transaction);
return transaction;
}
diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java
index 811054c294..c446b7d6b6 100644
--- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java
+++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporter.java
@@ -20,7 +20,6 @@
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.Tracer;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
import org.stagemonitor.configuration.ConfigurationRegistry;
@@ -39,7 +38,7 @@ public class ConfigurationExporter {
public static void main(String[] args) throws Exception {
ElasticApmTracer tracer = mock(ElasticApmTracer.class);
doReturn(tracer).when(tracer).require(ElasticApmTracer.class);
- doReturn(Tracer.TracerState.UNINITIALIZED).when(tracer).getState();
+ doReturn(ElasticApmTracer.TracerState.UNINITIALIZED).when(tracer).getState();
GlobalTracer.init(tracer);
try {
ConfigurationRegistry configurationRegistry = ConfigurationRegistry.builder()
diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java
index 162fd1155d..dca098e68e 100644
--- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java
+++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java
@@ -21,7 +21,6 @@
import co.elastic.apm.agent.MockTracer;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
-import co.elastic.apm.agent.impl.Tracer;
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
import co.elastic.apm.agent.util.DependencyInjectingServiceLoader;
import freemarker.template.Configuration;
@@ -89,7 +88,7 @@ void setUp() {
renderedDocumentationPath = Paths.get("../../docs/configuration.asciidoc");
ElasticApmTracer tracer = mock(ElasticApmTracer.class);
doReturn(tracer).when(tracer).require(ElasticApmTracer.class);
- doReturn(Tracer.TracerState.UNINITIALIZED).when(tracer).getState();
+ doReturn(ElasticApmTracer.TracerState.UNINITIALIZED).when(tracer).getState();
GlobalTracer.init(tracer);
configurationRegistry = ConfigurationRegistry.builder()
.optionProviders(ServiceLoader.load(ConfigurationOptionProvider.class))
diff --git a/apm-agent-core/README.md b/apm-agent-core/README.md
index d2c704efd0..470b964141 100644
--- a/apm-agent-core/README.md
+++ b/apm-agent-core/README.md
@@ -19,7 +19,7 @@ It's based on a Disruptor/ring buffer and receives finished transactions potenti
The ring buffer decouples the transaction-producing threads from the co.elastic.apm.agent.report.ReportingEventHandler,
which is single-threaded and sends the transactions to the APM server via HTTP.
-The class co.elastic.apm.agent.report.ReporterConfiguration contains all relevant configuration options for the reporter.
+The class co.elastic.apm.agent.report.ReporterConfigurationImpl contains all relevant configuration options for the reporter.
## Lifecycle
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
index d0c7a468c4..9f60cf3363 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
@@ -34,10 +34,9 @@
import co.elastic.apm.agent.bci.modules.ModuleOpener;
import co.elastic.apm.agent.common.ThreadUtils;
import co.elastic.apm.agent.common.util.SystemStandardOutputLogger;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import co.elastic.apm.agent.impl.ElasticApmTracer;
import co.elastic.apm.agent.impl.ElasticApmTracerBuilder;
-import co.elastic.apm.agent.impl.Tracer;
import co.elastic.apm.agent.tracer.GlobalTracer;
import co.elastic.apm.agent.logging.ApmServerLogAppender;
import co.elastic.apm.agent.matcher.MethodMatcher;
@@ -153,7 +152,7 @@ public static void initialize(@Nullable final String agentArguments, final Instr
// silently early abort when agent is disabled to minimize the number of loaded classes
List configSources = ElasticApmTracerBuilder.getConfigSources(agentArguments, premain);
for (ConfigurationSource configSource : configSources) {
- String enabled = configSource.getValue(CoreConfiguration.ENABLED_KEY);
+ String enabled = configSource.getValue(CoreConfigurationImpl.ENABLED_KEY);
if (enabled != null && !Boolean.parseBoolean(enabled)) {
return;
}
@@ -172,7 +171,7 @@ public static void initInstrumentation(ElasticApmTracer tracer, Instrumentation
}
private static void initInstrumentation(ElasticApmTracer tracer, Instrumentation instrumentation, boolean premain) {
- if (!tracer.getConfig(CoreConfiguration.class).isEnabled()) {
+ if (!tracer.getConfig(CoreConfigurationImpl.class).isEnabled()) {
return;
}
GlobalTracer.init(tracer);
@@ -181,12 +180,12 @@ private static void initInstrumentation(ElasticApmTracer tracer, Instrumentation
}
@Nonnull
- private static Iterable loadInstrumentations(Tracer tracer) {
+ private static Iterable loadInstrumentations(ElasticApmTracer tracer) {
List pluginClassLoaders = new ArrayList<>();
pluginClassLoaders.add(PrivilegedActionUtils.getClassLoader(ElasticApmAgent.class));
- pluginClassLoaders.addAll(createExternalPluginClassLoaders(tracer.getConfig(CoreConfiguration.class).getPluginsDir()));
+ pluginClassLoaders.addAll(createExternalPluginClassLoaders(tracer.getConfig(CoreConfigurationImpl.class).getPluginsDir()));
final List instrumentations = DependencyInjectingServiceLoader.load(ElasticApmInstrumentation.class, pluginClassLoaders, tracer);
- for (MethodMatcher traceMethod : tracer.getConfig(CoreConfiguration.class).getTraceMethods()) {
+ for (MethodMatcher traceMethod : tracer.getConfig(CoreConfigurationImpl.class).getTraceMethods()) {
instrumentations.add(new TraceMethodInstrumentation(tracer, traceMethod));
}
return instrumentations;
@@ -234,7 +233,7 @@ public static synchronized void initInstrumentation(final ElasticApmTracer trace
private static synchronized void initInstrumentation(final ElasticApmTracer tracer, Instrumentation instrumentation,
Iterable instrumentations, boolean premain) {
- CoreConfiguration coreConfig = tracer.getConfig(CoreConfiguration.class);
+ CoreConfigurationImpl coreConfig = tracer.getConfig(CoreConfigurationImpl.class);
if (!coreConfig.isEnabled()) {
return;
}
@@ -291,7 +290,7 @@ public void run() {
AgentBuilder agentBuilder = initAgentBuilder(tracer, instrumentation, instrumentations, logger, AgentBuilder.DescriptionStrategy.Default.POOL_ONLY, premain);
// Warmup Byte Buddy and agent's invokedynamic linkage paths on the attaching thread before installing it
- if (tracer.getConfig(CoreConfiguration.class).shouldWarmupByteBuddy()) {
+ if (tracer.getConfig(CoreConfigurationImpl.class).shouldWarmupByteBuddy()) {
agentBuilder = agentBuilder.with(new InstallationListenerImpl())
.warmUp(NonInstrumented.class)
.warmUp(Instrumented.class);
@@ -310,7 +309,7 @@ public void onChange(ConfigurationOption configurationOption, Object oldValue, O
}
public static synchronized Future> reInitInstrumentation() {
- final Tracer tracer = GlobalTracer.get().require(Tracer.class);
+ final ElasticApmTracer tracer = GlobalTracer.get().require(ElasticApmTracer.class);
if (instrumentation == null) {
throw new IllegalStateException("Can't re-init agent before it has been initialized");
}
@@ -350,7 +349,7 @@ static synchronized void doReInitInstrumentation(Iterable instrumentations, Logger logger,
AgentBuilder.DescriptionStrategy descriptionStrategy, boolean premain) {
- final CoreConfiguration coreConfiguration = tracer.getConfig(CoreConfiguration.class);
+ final CoreConfigurationImpl coreConfiguration = tracer.getConfig(CoreConfigurationImpl.class);
ElasticApmAgent.instrumentation = instrumentation;
final ByteBuddy byteBuddy = new ByteBuddy()
.with(TypeValidation.of(logger.isDebugEnabled()))
@@ -378,11 +377,11 @@ private static AgentBuilder initAgentBuilder(ElasticApmTracer tracer, Instrument
return agentBuilder;
}
- private static boolean isIncluded(ElasticApmInstrumentation advice, CoreConfiguration coreConfiguration) {
+ private static boolean isIncluded(ElasticApmInstrumentation advice, CoreConfigurationImpl coreConfiguration) {
return isInstrumentationEnabled(advice, coreConfiguration) && coreConfiguration.isInstrumentationEnabled(advice.getInstrumentationGroupNames());
}
- private static boolean isInstrumentationEnabled(ElasticApmInstrumentation advice, CoreConfiguration coreConfiguration) {
+ private static boolean isInstrumentationEnabled(ElasticApmInstrumentation advice, CoreConfigurationImpl coreConfiguration) {
return advice.includeWhenInstrumentationIsDisabled() || coreConfiguration.isInstrument();
}
@@ -390,8 +389,8 @@ private static AgentBuilder applyAdvice(final ElasticApmTracer tracer, final Age
final ElasticApmInstrumentation instrumentation, final ElementMatcher super TypeDescription> typeMatcher) {
final Logger logger = getLogger();
logger.debug("Applying instrumentation {}", instrumentation.getClass().getName());
- final boolean classLoadingMatchingPreFilter = tracer.getConfig(CoreConfiguration.class).isClassLoadingMatchingPreFilter();
- final boolean typeMatchingWithNamePreFilter = tracer.getConfig(CoreConfiguration.class).isTypeMatchingWithNamePreFilter();
+ final boolean classLoadingMatchingPreFilter = tracer.getConfig(CoreConfigurationImpl.class).isClassLoadingMatchingPreFilter();
+ final boolean typeMatchingWithNamePreFilter = tracer.getConfig(CoreConfigurationImpl.class).isTypeMatchingWithNamePreFilter();
final ElementMatcher.Junction classLoaderMatcher = instrumentation.getClassLoaderMatcher();
final ElementMatcher super NamedElement> typeMatcherPreFilter = instrumentation.getTypeMatcherPreFilter();
final ElementMatcher.Junction versionPostFilter = instrumentation.getProtectionDomainPostFilter();
@@ -648,7 +647,7 @@ public static synchronized void reset() {
if (instrumentation == null) {
return;
}
- GlobalTracer.get().require(Tracer.class).stop();
+ GlobalTracer.get().require(ElasticApmTracer.class).stop();
GlobalTracer.setNoop();
Exception exception = null;
if (resettableClassFileTransformer != null) {
@@ -678,7 +677,7 @@ public static synchronized void reset() {
pluginPackages2pluginClassLoaderCustomizations.clear();
}
- private static AgentBuilder getAgentBuilder(final ByteBuddy byteBuddy, final CoreConfiguration coreConfiguration, final Logger logger,
+ private static AgentBuilder getAgentBuilder(final ByteBuddy byteBuddy, final CoreConfigurationImpl coreConfiguration, final Logger logger,
final AgentBuilder.DescriptionStrategy descriptionStrategy, final boolean premain,
final boolean useTypePoolCache) {
AgentBuilder.LocationStrategy locationStrategy = AgentBuilder.LocationStrategy.ForClassLoader.WEAK;
@@ -826,7 +825,7 @@ private static void applyInstrumentation(Class> classToInstrument, Collection<
appliedInstrumentations = Collections.unmodifiableSet(appliedInstrumentations);
dynamicallyInstrumentedClasses.put(classToInstrument, appliedInstrumentations);
- CoreConfiguration config = tracer.getConfig(CoreConfiguration.class);
+ CoreConfigurationImpl config = tracer.getConfig(CoreConfigurationImpl.class);
final Logger logger = LoggerFactory.getLogger(ElasticApmAgent.class);
final ByteBuddy byteBuddy = new ByteBuddy()
.with(TypeValidation.of(logger.isDebugEnabled()))
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/ErrorLoggingListener.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/ErrorLoggingListener.java
index 4428669786..536b3b10eb 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/ErrorLoggingListener.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/ErrorLoggingListener.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.bci.bytebuddy;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.utility.JavaModule;
import co.elastic.apm.agent.sdk.logging.Logger;
@@ -35,7 +35,7 @@ public void onError(String typeName, ClassLoader classLoader, JavaModule module,
"You may try setting the '{}' config option to 'true', but notice that it may cause VerificationErrors or other issues.",
typeName,
((MinimumClassFileVersionValidator.UnsupportedClassFileVersionException)throwable).getMinVersion(),
- CoreConfiguration.INSTRUMENT_ANCIENT_BYTECODE
+ CoreConfigurationImpl.INSTRUMENT_ANCIENT_BYTECODE
);
} else {
if (throwable instanceof net.bytebuddy.pool.TypePool.Resolution.NoSuchTypeException) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/classloading/ExternalPluginClassLoader.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/classloading/ExternalPluginClassLoader.java
index 6fa9107f7d..4de316323f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/classloading/ExternalPluginClassLoader.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/bci/classloading/ExternalPluginClassLoader.java
@@ -19,7 +19,7 @@
package co.elastic.apm.agent.bci.classloading;
import co.elastic.apm.agent.common.util.AgentInfo;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -38,7 +38,7 @@
import static net.bytebuddy.matcher.ElementMatchers.not;
/**
- * Loads plugins from {@link CoreConfiguration#getPluginsDir() plugins_dir}
+ * Loads plugins from {@link CoreConfigurationImpl#getPluginsDir() plugins_dir}
*
* @see co.elastic.apm.agent.bci.IndyBootstrap
*/
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
index 0f63ac2d0c..09c54e7458 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ApmServerConfigurationSource.java
@@ -160,7 +160,7 @@ private void pollConfig(ConfigurationRegistry configurationRegistry) {
*/
@Nullable
String fetchConfig(final ConfigurationRegistry configurationRegistry) {
- if (!configurationRegistry.getConfig(CoreConfiguration.class).isCentralConfigEnabled()) {
+ if (!configurationRegistry.getConfig(CoreConfigurationImpl.class).isCentralConfigEnabled()) {
logger.debug("Remote configuration is disabled");
return null;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java
similarity index 98%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java
index b84f4bd172..7c42ebc23e 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/CoreConfigurationImpl.java
@@ -20,17 +20,12 @@
import co.elastic.apm.agent.bci.ElasticApmAgent;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.impl.transaction.Span;
+import co.elastic.apm.agent.impl.transaction.SpanImpl;
import co.elastic.apm.agent.matcher.MethodMatcher;
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.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 co.elastic.apm.agent.tracer.configuration.*;
import org.stagemonitor.configuration.ConfigurationOption;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
import org.stagemonitor.configuration.converter.AbstractValueConverter;
@@ -56,10 +51,10 @@
import java.util.Set;
import java.util.concurrent.TimeUnit;
-import static co.elastic.apm.agent.logging.LoggingConfiguration.AGENT_HOME_PLACEHOLDER;
+import static co.elastic.apm.agent.logging.LoggingConfigurationImpl.AGENT_HOME_PLACEHOLDER;
import static co.elastic.apm.agent.tracer.configuration.RangeValidator.isInRange;
-public class CoreConfiguration extends ConfigurationOptionProvider implements co.elastic.apm.agent.tracer.configuration.CoreConfiguration {
+public class CoreConfigurationImpl extends ConfigurationOptionProvider implements CoreConfiguration {
public static final int DEFAULT_LONG_FIELD_MAX_LENGTH = 10000;
private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -246,7 +241,7 @@ public class CoreConfiguration extends ConfigurationOptionProvider implements co
.description("Limits the amount of spans that are recorded per transaction.\n\n" +
"This is helpful in cases where a transaction creates a very high amount of spans (e.g. thousands of SQL queries).\n\n" +
"Setting an upper limit will prevent overloading the agent and the APM server with too much work for such edge cases.\n\n" +
- "A message will be logged when the max number of spans has been exceeded but only at a rate of once every " + TimeUnit.MICROSECONDS.toMinutes(Span.MAX_LOG_INTERVAL_MICRO_SECS) + " minutes to ensure performance is not impacted.")
+ "A message will be logged when the max number of spans has been exceeded but only at a rate of once every " + TimeUnit.MICROSECONDS.toMinutes(SpanImpl.MAX_LOG_INTERVAL_MICRO_SECS) + " minutes to ensure performance is not impacted.")
.dynamic(true)
.buildWithDefault(500);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfigurationImpl.java
similarity index 97%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfigurationImpl.java
index 90c5ff563e..db67ada95f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfigurationImpl.java
@@ -19,6 +19,7 @@
package co.elastic.apm.agent.configuration;
import co.elastic.apm.agent.tracer.configuration.ListValueConverter;
+import co.elastic.apm.agent.tracer.configuration.MetricsConfiguration;
import org.stagemonitor.configuration.ConfigurationOption;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
import org.stagemonitor.configuration.converter.DoubleValueConverter;
@@ -29,7 +30,7 @@
import java.util.HashSet;
import java.util.List;
-public class MetricsConfiguration extends ConfigurationOptionProvider implements co.elastic.apm.agent.tracer.configuration.MetricsConfiguration {
+public class MetricsConfigurationImpl extends ConfigurationOptionProvider implements MetricsConfiguration {
private static final String METRICS_CATEGORY = "Metrics";
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfigurationImpl.java
similarity index 92%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfiguration.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfigurationImpl.java
index 36875fbf04..6df65ad344 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/ServerlessConfigurationImpl.java
@@ -19,15 +19,16 @@
package co.elastic.apm.agent.configuration;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
+import co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration;
import org.stagemonitor.configuration.ConfigurationOption;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
-public class ServerlessConfiguration extends ConfigurationOptionProvider implements co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration {
+public class ServerlessConfigurationImpl extends ConfigurationOptionProvider implements ServerlessConfiguration {
public static final String SERVERLESS_CATEGORY = "Serverless";
private final boolean runsOnAwsLambda;
- public ServerlessConfiguration() {
+ public ServerlessConfigurationImpl() {
String lambdaName = PrivilegedActionUtils.getEnv("AWS_LAMBDA_FUNCTION_NAME");
this.runsOnAwsLambda = null != lambdaName && !lambdaName.isEmpty();
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
index 4de8761af2..b2bb9e1c21 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/StartupInfo.java
@@ -22,7 +22,7 @@
import co.elastic.apm.agent.tracer.configuration.TimeDuration;
import co.elastic.apm.agent.tracer.AbstractLifecycleListener;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
+import co.elastic.apm.agent.impl.stacktrace.StacktraceConfigurationImpl;
import co.elastic.apm.agent.util.VersionUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -63,8 +63,8 @@ public void init(Tracer tracer) {
}
void logConfiguration(ConfigurationRegistry configurationRegistry, Logger logger) {
- final String serviceName = configurationRegistry.getConfig(CoreConfiguration.class).getServiceName();
- final String serviceVersion = configurationRegistry.getConfig(CoreConfiguration.class).getServiceVersion();
+ final String serviceName = configurationRegistry.getConfig(CoreConfigurationImpl.class).getServiceName();
+ final String serviceVersion = configurationRegistry.getConfig(CoreConfigurationImpl.class).getServiceVersion();
StringBuilder serviceNameAndVersion = new StringBuilder(serviceName);
if (serviceVersion != null) {
@@ -87,9 +87,9 @@ void logConfiguration(ConfigurationRegistry configurationRegistry, Logger logger
}
}
}
- if (configurationRegistry.getConfig(StacktraceConfiguration.class).getApplicationPackages().isEmpty()) {
+ if (configurationRegistry.getConfig(StacktraceConfigurationImpl.class).getApplicationPackages().isEmpty()) {
logger.warn("To enable all features and decrease startup time, please configure {}",
- StacktraceConfiguration.APPLICATION_PACKAGES);
+ StacktraceConfigurationImpl.APPLICATION_PACKAGES);
}
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActivationListener.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActivationListener.java
index 4461a537e9..25e522b578 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActivationListener.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActivationListener.java
@@ -18,10 +18,10 @@
*/
package co.elastic.apm.agent.impl;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
/**
- * A callback for {@link AbstractSpan} activation and deactivation events
+ * A callback for {@link AbstractSpanImpl} activation and deactivation events
*
* The constructor can optionally have a {@link ElasticApmTracer} parameter.
*
@@ -29,22 +29,22 @@
public interface ActivationListener {
/**
- * A callback for {@link AbstractSpan#activate()}
+ * A callback for {@link AbstractSpanImpl#activate()}
*
- * @param span the {@link AbstractSpan} that is being activated
+ * @param span the {@link AbstractSpanImpl} that is being activated
* @throws Throwable if there was an error while calling this method
*/
- void beforeActivate(AbstractSpan> span) throws Throwable;
+ void beforeActivate(AbstractSpanImpl> span) throws Throwable;
/**
- * A callback for {@link AbstractSpan#deactivate()}
+ * A callback for {@link AbstractSpanImpl#deactivate()}
*
- * Note: the corresponding span may already be {@link AbstractSpan#end() ended} and {@link AbstractSpan#resetState() recycled}.
- * That's why there is no {@link AbstractSpan} parameter.
+ * Note: the corresponding span may already be {@link AbstractSpanImpl#end() ended} and {@link AbstractSpanImpl#resetState() recycled}.
+ * That's why there is no {@link AbstractSpanImpl} parameter.
*
*
* @param deactivatedSpan the context that has just been deactivated
* @throws Throwable if there was an error while calling this method
*/
- void afterDeactivate(AbstractSpan> deactivatedSpan) throws Throwable;
+ void afterDeactivate(AbstractSpanImpl> deactivatedSpan) throws Throwable;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActiveStack.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActiveStack.java
index e0d421b4f0..7bce0fef45 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActiveStack.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ActiveStack.java
@@ -18,9 +18,9 @@
*/
package co.elastic.apm.agent.impl;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.ElasticContext;
-import co.elastic.apm.agent.impl.transaction.ElasticContextWrapper;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
+import co.elastic.apm.agent.impl.transaction.TraceStateImpl;
+import co.elastic.apm.agent.impl.transaction.TraceStateWrapper;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -55,11 +55,11 @@ class ActiveStack {
* Also, the caller does not have to keep a reference to the previously active span, as that is maintained by the stack.
* This makes activating a span allocation-free (assuming the stack has enough pre-allocated slots available).
*/
- private final Deque> activeContextStack = new ArrayDeque>();
+ private final Deque> activeContextStack = new ArrayDeque>();
- private final EmptyElasticContext emptyContext;
+ private final EmptyTraceState emptyContext;
- ActiveStack(int stackMaxDepth, EmptyElasticContext emptyContextForTracer) {
+ ActiveStack(int stackMaxDepth, EmptyTraceState emptyContextForTracer) {
this.stackMaxDepth = stackMaxDepth;
this.emptyContext = emptyContextForTracer;
}
@@ -68,18 +68,18 @@ class ActiveStack {
* @return the current context, potentially empty when no span, transaction or baggage is currently active.
*/
- public ElasticContext> currentContext() {
- ElasticContext> current = activeContextStack.peek();
+ public TraceStateImpl> currentContext() {
+ TraceStateImpl> current = activeContextStack.peek();
// When the active context is wrapped, the wrapper should be transparent to the caller, thus we always return
// the underlying wrapped context.
- if (current instanceof ElasticContextWrapper) {
- return ((ElasticContextWrapper>) current).getWrappedContext();
+ if (current instanceof TraceStateWrapper) {
+ return ((TraceStateWrapper>) current).getWrappedContext();
}
return current != null ? current : emptyContext;
}
- boolean activate(ElasticContext> context, List activationListeners) {
+ boolean activate(TraceStateImpl> context, List activationListeners) {
if (logger.isDebugEnabled()) {
logger.debug("Activating {} on thread {}", context, Thread.currentThread().getId());
}
@@ -96,7 +96,7 @@ boolean activate(ElasticContext> context, List activationL
}
context.incrementReferences();
- AbstractSpan> span = context.getSpan();
+ AbstractSpanImpl> span = context.getSpan();
if (span != null) {
triggerActivationListeners(span, true, activationListeners);
}
@@ -105,7 +105,7 @@ boolean activate(ElasticContext> context, List activationL
return true;
}
- boolean deactivate(ElasticContext> context, List activationListeners, boolean assertionsEnabled) {
+ boolean deactivate(TraceStateImpl> context, List activationListeners, boolean assertionsEnabled) {
if (logger.isDebugEnabled()) {
logger.debug("Deactivating {} on thread {}", context, Thread.currentThread().getId());
}
@@ -115,13 +115,13 @@ boolean deactivate(ElasticContext> context, List activatio
return false;
}
- ElasticContext> activeContext = currentContext();
+ TraceStateImpl> activeContext = currentContext();
activeContextStack.remove();
try {
assertIsActive(context, activeContext, assertionsEnabled);
- AbstractSpan> span = context.getSpan();
+ AbstractSpanImpl> span = context.getSpan();
if (null != span) {
triggerActivationListeners(span, false, activationListeners);
}
@@ -131,7 +131,7 @@ boolean deactivate(ElasticContext> context, List activatio
return true;
}
- private void triggerActivationListeners(AbstractSpan> span, boolean isActivate, List activationListeners) {
+ private void triggerActivationListeners(AbstractSpanImpl> span, boolean isActivate, List activationListeners) {
for (int i = 0, size = activationListeners.size(); i < size; i++) {
ActivationListener listener = activationListeners.get(i);
try {
@@ -149,7 +149,7 @@ private void triggerActivationListeners(AbstractSpan> span, boolean isActivate
}
}
- private void assertIsActive(ElasticContext> context, @Nullable ElasticContext> currentlyActive, boolean assertionsEnabled) {
+ private void assertIsActive(TraceStateImpl> context, @Nullable TraceStateImpl> currentlyActive, boolean assertionsEnabled) {
if (context != currentlyActive) {
logger.warn("Deactivating a context ({}) which is not the currently active one ({}). " +
"This can happen when not properly deactivating a previous span or context.", context, currentlyActive);
@@ -169,17 +169,17 @@ private void assertIsActive(ElasticContext> context, @Nullable ElasticContext<
* @param wrapper type
* @return newly (or previously) created wrapper
*/
- > T wrapActiveContextIfRequired(Class wrapperClass, Callable wrapFunction, int approximateContextSize) {
+ > T wrapActiveContextIfRequired(Class wrapperClass, Callable wrapFunction, int approximateContextSize) {
// the current context might be either a "regular" one or a "wrapped" one if it has already been wrapped
- ElasticContext> current = activeContextStack.peek();
+ TraceStateImpl> current = activeContextStack.peek();
Objects.requireNonNull(current, "active context required for wrapping");
- ElasticContextWrapper> wrapper;
- if (current instanceof ElasticContextWrapper) {
- wrapper = (ElasticContextWrapper>) current;
+ TraceStateWrapper> wrapper;
+ if (current instanceof TraceStateWrapper) {
+ wrapper = (TraceStateWrapper>) current;
} else {
- wrapper = new ElasticContextWrapper<>(approximateContextSize, current);
+ wrapper = new TraceStateWrapper<>(approximateContextSize, current);
}
T wrapped = wrapper.wrapIfRequired(wrapperClass, wrapFunction);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
index 893dfb6c69..a675010497 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
@@ -25,17 +25,18 @@
import co.elastic.apm.agent.common.JvmRuntimeInfo;
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.configuration.AutoDetectedServiceInfo;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
-import co.elastic.apm.agent.configuration.MetricsConfiguration;
-import co.elastic.apm.agent.configuration.ServerlessConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.configuration.MetricsConfigurationImpl;
+import co.elastic.apm.agent.configuration.ServerlessConfigurationImpl;
import co.elastic.apm.agent.impl.error.RedactedException;
import co.elastic.apm.agent.impl.metadata.FaaSMetaDataExtension;
import co.elastic.apm.agent.impl.metadata.Framework;
import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
import co.elastic.apm.agent.impl.metadata.NameAndIdField;
import co.elastic.apm.agent.impl.metadata.ServiceFactory;
-import co.elastic.apm.agent.impl.transaction.Id;
+import co.elastic.apm.agent.impl.transaction.*;
import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
+import co.elastic.apm.agent.tracer.Tracer;
import co.elastic.apm.agent.tracer.metrics.DoubleSupplier;
import co.elastic.apm.agent.tracer.metrics.Labels;
import co.elastic.apm.agent.tracer.pooling.Allocator;
@@ -44,24 +45,19 @@
import co.elastic.apm.agent.configuration.SpanConfiguration;
import co.elastic.apm.agent.context.ClosableLifecycleListenerAdapter;
import co.elastic.apm.agent.tracer.LifecycleListener;
-import co.elastic.apm.agent.impl.baggage.Baggage;
+import co.elastic.apm.agent.impl.baggage.BaggageImpl;
import co.elastic.apm.agent.impl.baggage.W3CBaggagePropagation;
-import co.elastic.apm.agent.impl.error.ErrorCapture;
+import co.elastic.apm.agent.impl.error.ErrorCaptureImpl;
import co.elastic.apm.agent.impl.sampling.ProbabilitySampler;
import co.elastic.apm.agent.impl.sampling.Sampler;
-import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.ElasticContext;
-import co.elastic.apm.agent.impl.transaction.Span;
-import co.elastic.apm.agent.impl.transaction.TraceContext;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.logging.LoggingConfiguration;
+import co.elastic.apm.agent.impl.stacktrace.StacktraceConfigurationImpl;
+import co.elastic.apm.agent.logging.LoggingConfigurationImpl;
import co.elastic.apm.agent.metrics.MetricRegistry;
-import co.elastic.apm.agent.objectpool.ObjectPool;
-import co.elastic.apm.agent.objectpool.ObjectPoolFactory;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
+import co.elastic.apm.agent.objectpool.ObjectPoolFactoryImpl;
import co.elastic.apm.agent.report.ApmServerClient;
import co.elastic.apm.agent.report.Reporter;
-import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.report.ReporterConfigurationImpl;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.sdk.internal.util.VersionUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
@@ -116,7 +112,7 @@ public class ElasticApmTracer implements Tracer {
static {
Set headerNames = new HashSet<>();
- headerNames.addAll(TraceContext.TRACE_TEXTUAL_HEADERS);
+ headerNames.addAll(TraceContextImpl.TRACE_TEXTUAL_HEADERS);
headerNames.add(W3CBaggagePropagation.BAGGAGE_HEADER_NAME);
TRACE_HEADER_NAMES = Collections.unmodifiableSet(headerNames);
}
@@ -126,15 +122,15 @@ public class ElasticApmTracer implements Tracer {
private final ConfigurationRegistry configurationRegistry;
private final ApmServerClient apmServerClient;
private final List lifecycleListeners = new CopyOnWriteArrayList<>();
- private final ObjectPool transactionPool;
- private final ObjectPool spanPool;
- private final ObjectPool errorPool;
- private final ObjectPool spanLinkPool;
- private final ObjectPool profilingCorrelationStackTraceIdPool;
+ private final ObservableObjectPool transactionPool;
+ private final ObservableObjectPool spanPool;
+ private final ObservableObjectPool errorPool;
+ private final ObservableObjectPool spanLinkPool;
+ private final ObservableObjectPool profilingCorrelationStackTraceIdPool;
private final Reporter reporter;
- private final ObjectPoolFactory objectPoolFactory;
+ private final ObjectPoolFactoryImpl objectPoolFactory;
- private final EmptyElasticContext emptyContext;
+ private final EmptyTraceState emptyContext;
private final ThreadLocal activeStack = new ThreadLocal() {
@Override
@@ -146,7 +142,7 @@ protected ActiveStack initialValue() {
}
};
- private final CoreConfiguration coreConfiguration;
+ private final CoreConfigurationImpl coreConfiguration;
private final int transactionMaxSpans;
private final SpanConfiguration spanConfiguration;
private final List activationListeners;
@@ -172,12 +168,12 @@ protected ActiveStack initialValue() {
static {
checkClassloader();
- configs.put(co.elastic.apm.agent.tracer.configuration.CoreConfiguration.class, CoreConfiguration.class);
- configs.put(co.elastic.apm.agent.tracer.configuration.LoggingConfiguration.class, LoggingConfiguration.class);
- configs.put(co.elastic.apm.agent.tracer.configuration.MetricsConfiguration.class, MetricsConfiguration.class);
- configs.put(co.elastic.apm.agent.tracer.configuration.ReporterConfiguration.class, ReporterConfiguration.class);
- configs.put(co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration.class, ServerlessConfiguration.class);
- configs.put(co.elastic.apm.agent.tracer.configuration.StacktraceConfiguration.class, StacktraceConfiguration.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.CoreConfiguration.class, CoreConfigurationImpl.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.LoggingConfiguration.class, LoggingConfigurationImpl.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.MetricsConfiguration.class, MetricsConfigurationImpl.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.ReporterConfiguration.class, ReporterConfigurationImpl.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.ServerlessConfiguration.class, ServerlessConfigurationImpl.class);
+ configs.put(co.elastic.apm.agent.tracer.configuration.StacktraceConfiguration.class, StacktraceConfigurationImpl.class);
}
private static void checkClassloader() {
@@ -219,17 +215,17 @@ private static void checkClassloader() {
}
- ElasticApmTracer(ConfigurationRegistry configurationRegistry, MetricRegistry metricRegistry, Reporter reporter, ObjectPoolFactory poolFactory,
+ ElasticApmTracer(ConfigurationRegistry configurationRegistry, MetricRegistry metricRegistry, Reporter reporter, ObjectPoolFactoryImpl poolFactory,
ApmServerClient apmServerClient, final String ephemeralId, MetaDataFuture metaDataFuture) {
- this.emptyContext = new EmptyElasticContext(this);
+ this.emptyContext = new EmptyTraceState(this);
this.metricRegistry = metricRegistry;
this.configurationRegistry = configurationRegistry;
this.reporter = reporter;
this.apmServerClient = apmServerClient;
this.ephemeralId = ephemeralId;
this.metaDataFuture = metaDataFuture;
- int maxPooledElements = configurationRegistry.getConfig(ReporterConfiguration.class).getMaxQueueSize() * 2;
- coreConfiguration = configurationRegistry.getConfig(CoreConfiguration.class);
+ int maxPooledElements = configurationRegistry.getConfig(ReporterConfigurationImpl.class).getMaxQueueSize() * 2;
+ coreConfiguration = configurationRegistry.getConfig(CoreConfigurationImpl.class);
transactionMaxSpans = coreConfiguration.getTransactionMaxSpans();
spanConfiguration = configurationRegistry.getConfig(SpanConfiguration.class);
@@ -250,12 +246,12 @@ public void onChange(ConfigurationOption> configurationOption, Boolean oldValu
errorPool = poolFactory.createErrorPool(maxPooledElements / 2, this);
// span links pool allows for 10X the maximum allowed span links per span
- spanLinkPool = poolFactory.createSpanLinkPool(AbstractSpan.MAX_ALLOWED_SPAN_LINKS * 10, this);
+ spanLinkPool = poolFactory.createSpanLinkPool(AbstractSpanImpl.MAX_ALLOWED_SPAN_LINKS * 10, this);
- profilingCorrelationStackTraceIdPool = poolFactory.createRecyclableObjectPool(maxPooledElements, new Allocator() {
+ profilingCorrelationStackTraceIdPool = poolFactory.createRecyclableObjectPool(maxPooledElements, new Allocator() {
@Override
- public Id createInstance() {
- return Id.new128BitId();
+ public IdImpl createInstance() {
+ return IdImpl.new128BitId();
}
});
@@ -283,32 +279,38 @@ public void onChange(ConfigurationOption> configurationOption, Double oldValue
@Override
@Nullable
- public Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader) {
+ public TransactionImpl startRootTransaction(@Nullable ClassLoader initiatingClassLoader) {
return startRootTransaction(sampler, -1, currentContext().getBaggage(), initiatingClassLoader);
}
- @Override
@Nullable
- public Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader, long epochMicro) {
+ public TransactionImpl startRootTransaction(@Nullable ClassLoader initiatingClassLoader, long epochMicro) {
return startRootTransaction(sampler, epochMicro, currentContext().getBaggage(), initiatingClassLoader);
}
@Nullable
- @Override
- public Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader, Baggage baseBaggage, long epochMicro) {
+ public TransactionImpl startRootTransaction(@Nullable ClassLoader initiatingClassLoader, BaggageImpl baseBaggage, long epochMicro) {
return startRootTransaction(sampler, epochMicro, baseBaggage, initiatingClassLoader);
}
-
@Nullable
- public Transaction startRootTransaction(Sampler sampler, long epochMicros, @Nullable ClassLoader initiatingClassLoader) {
+ public TransactionImpl startRootTransaction(Sampler sampler, long epochMicros, @Nullable ClassLoader initiatingClassLoader) {
return startRootTransaction(sampler, epochMicros, currentContext().getBaggage(), initiatingClassLoader);
}
- @Override
+ /**
+ * Starts a trace-root transaction with a specified sampler and start timestamp
+ *
+ * @param sampler the {@link Sampler} instance which is responsible for determining the sampling decision if this is a root transaction
+ * @param epochMicros the start timestamp
+ * @param initiatingClassLoader the class loader corresponding to the service which initiated the creation of the transaction.
+ * Used to determine the service name and to load application-scoped classes like the {@link org.slf4j.MDC},
+ * for log correlation.
+ * @return a transaction that will be the root of the current trace if the agent is currently RUNNING; null otherwise
+ */
@Nullable
- public Transaction startRootTransaction(Sampler sampler, long epochMicros, Baggage baseBaggage, @Nullable ClassLoader initiatingClassLoader) {
- Transaction transaction = null;
+ public TransactionImpl startRootTransaction(Sampler sampler, long epochMicros, BaggageImpl baseBaggage, @Nullable ClassLoader initiatingClassLoader) {
+ TransactionImpl transaction = null;
if (isRunning()) {
transaction = createTransaction().startRoot(epochMicros, sampler, baseBaggage);
afterTransactionStart(initiatingClassLoader, transaction);
@@ -316,29 +318,40 @@ public Transaction startRootTransaction(Sampler sampler, long epochMicros, Bagga
return transaction;
}
- @Override
@Nullable
- public Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, @Nullable ClassLoader initiatingClassLoader) {
- return startChildTransaction(headerCarrier, headersGetter, sampler, -1, initiatingClassLoader);
+ public TransactionImpl startChildTransaction(@Nullable C headerCarrier, HeaderGetter headerGetter, @Nullable ClassLoader initiatingClassLoader) {
+ return startChildTransaction(headerCarrier, headerGetter, sampler, -1, initiatingClassLoader);
}
- @Override
@Nullable
- public Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, @Nullable ClassLoader initiatingClassLoader, Baggage baseBaggage, long epochMicros) {
+ public TransactionImpl startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, @Nullable ClassLoader initiatingClassLoader, BaggageImpl baseBaggage, long epochMicros) {
return startChildTransaction(headerCarrier, headersGetter, sampler, epochMicros, initiatingClassLoader);
}
- @Override
+ /**
+ * Starts a transaction as a child of the context headers obtained through the provided {@link HeaderGetter}.
+ * If the created transaction cannot be started as a child transaction (for example - if no parent context header is
+ * available), then it will be started as the root transaction of the trace.
+ *
+ * @param headerCarrier the Object from which context headers can be obtained, typically a request or a message
+ * @param headersGetter provides the trace context headers required in order to create a child transaction
+ * @param sampler the {@link Sampler} instance which is responsible for determining the sampling decision if this is a root transaction
+ * @param epochMicros the start timestamp
+ * @param initiatingClassLoader the class loader corresponding to the service which initiated the creation of the transaction.
+ * Used to determine the service name and to load application-scoped classes like the {@link org.slf4j.MDC},
+ * for log correlation.
+ * @return a transaction which is a child of the provided parent if the agent is currently RUNNING; null otherwise
+ */
@Nullable
- public Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, Sampler sampler,
- long epochMicros, @Nullable ClassLoader initiatingClassLoader) {
+ public TransactionImpl startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, Sampler sampler,
+ long epochMicros, @Nullable ClassLoader initiatingClassLoader) {
return startChildTransaction(headerCarrier, headersGetter, sampler, epochMicros, currentContext().getBaggage(), initiatingClassLoader);
}
@Nullable
- private Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, Sampler sampler,
- long epochMicros, Baggage baseBaggage, @Nullable ClassLoader initiatingClassLoader) {
- Transaction transaction = null;
+ private TransactionImpl startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, Sampler sampler,
+ long epochMicros, BaggageImpl baseBaggage, @Nullable ClassLoader initiatingClassLoader) {
+ TransactionImpl transaction = null;
if (isRunning()) {
transaction = createTransaction().start(headerCarrier,
headersGetter, epochMicros, sampler, baseBaggage);
@@ -347,7 +360,7 @@ private Transaction startChildTransaction(@Nullable C headerCarrier, Head
return transaction;
}
- private void afterTransactionStart(@Nullable ClassLoader initiatingClassLoader, Transaction transaction) {
+ private void afterTransactionStart(@Nullable ClassLoader initiatingClassLoader, TransactionImpl transaction) {
if (logger.isDebugEnabled()) {
logger.debug("startTransaction {}", transaction);
if (logger.isTraceEnabled()) {
@@ -362,12 +375,12 @@ private void afterTransactionStart(@Nullable ClassLoader initiatingClassLoader,
profilingIntegration.afterTransactionStart(transaction);
}
- public Transaction noopTransaction() {
+ public TransactionImpl noopTransaction() {
return createTransaction().startNoop();
}
- private Transaction createTransaction() {
- Transaction transaction = transactionPool.createInstance();
+ private TransactionImpl createTransaction() {
+ TransactionImpl transaction = transactionPool.createInstance();
while (transaction.getReferenceCount() != 0) {
logger.warn("Tried to start a transaction with a non-zero reference count {} {}", transaction.getReferenceCount(), transaction);
transaction = transactionPool.createInstance();
@@ -377,14 +390,14 @@ private Transaction createTransaction() {
@Override
@Nullable
- public Transaction currentTransaction() {
+ public TransactionImpl currentTransaction() {
return currentContext().getTransaction();
}
@Nullable
@Override
- public ErrorCapture getActiveError() {
- return ErrorCapture.getActive();
+ public ErrorCaptureImpl getActiveError() {
+ return ErrorCaptureImpl.getActive();
}
/**
@@ -408,12 +421,12 @@ public ErrorCapture getActiveError() {
* @param the type of the parent context
* @return a new started span
*/
- public Span startSpan(TraceContext.ChildContextCreator childContextCreator, T parentContext, Baggage baggage) {
+ public SpanImpl startSpan(TraceContextImpl.ChildContextCreator childContextCreator, T parentContext, BaggageImpl baggage) {
return startSpan(childContextCreator, parentContext, baggage, -1);
}
- public Span startSpan(AbstractSpan> parent, Baggage baggage, long epochMicros) {
- return startSpan(TraceContext.fromParent(), parent, baggage, epochMicros);
+ public SpanImpl startSpan(AbstractSpanImpl> parent, BaggageImpl baggage, long epochMicros) {
+ return startSpan(TraceContextImpl.fromParent(), parent, baggage, epochMicros);
}
/**
@@ -421,12 +434,12 @@ public Span startSpan(AbstractSpan> parent, Baggage baggage, long epochMicros)
* @param epochMicros the start timestamp of the span in microseconds after epoch
* @return a new started span
*/
- public Span startSpan(TraceContext.ChildContextCreator childContextCreator, T parentContext, Baggage baggage, long epochMicros) {
+ public SpanImpl startSpan(TraceContextImpl.ChildContextCreator childContextCreator, T parentContext, BaggageImpl baggage, long epochMicros) {
return createSpan().start(childContextCreator, parentContext, baggage, epochMicros);
}
- private Span createSpan() {
- Span span = spanPool.createInstance();
+ private SpanImpl createSpan() {
+ SpanImpl span = spanPool.createInstance();
while (span.getReferenceCount() != 0) {
logger.warn("Tried to start a span with a non-zero reference count {} {}", span.getReferenceCount(), span);
span = spanPool.createInstance();
@@ -434,19 +447,17 @@ private Span createSpan() {
return span;
}
- @Override
public void captureAndReportException(@Nullable Throwable e, ClassLoader initiatingClassLoader) {
- ErrorCapture errorCapture = captureException(System.currentTimeMillis() * 1000, e, currentContext(), initiatingClassLoader);
+ ErrorCaptureImpl errorCapture = captureException(System.currentTimeMillis() * 1000, e, currentContext(), initiatingClassLoader);
if (errorCapture != null) {
errorCapture.end();
}
}
- @Override
@Nullable
- public String captureAndReportException(long epochMicros, @Nullable Throwable e, ElasticContext> parentContext) {
+ public String captureAndReportException(long epochMicros, @Nullable Throwable e, TraceStateImpl> parentContext) {
String id = null;
- ErrorCapture errorCapture = captureException(epochMicros, e, parentContext, null);
+ ErrorCaptureImpl errorCapture = captureException(epochMicros, e, parentContext, null);
if (errorCapture != null) {
id = errorCapture.getTraceContext().getId().toString();
errorCapture.end();
@@ -454,20 +465,19 @@ public String captureAndReportException(long epochMicros, @Nullable Throwable e,
return id;
}
- @Override
@Nullable
- public ErrorCapture captureException(@Nullable Throwable e, ElasticContext> parentContext, @Nullable ClassLoader initiatingClassLoader) {
+ public ErrorCaptureImpl captureException(@Nullable Throwable e, TraceStateImpl> parentContext, @Nullable ClassLoader initiatingClassLoader) {
return captureException(System.currentTimeMillis() * 1000, e, parentContext, initiatingClassLoader);
}
@Nullable
@Override
- public ErrorCapture captureException(@Nullable Throwable e, @Nullable ClassLoader initiatingClassLoader) {
+ public ErrorCaptureImpl captureException(@Nullable Throwable e, @Nullable ClassLoader initiatingClassLoader) {
return captureException(System.currentTimeMillis() * 1000, e, currentContext(), initiatingClassLoader);
}
@Nullable
- private ErrorCapture captureException(long epochMicros, @Nullable Throwable e, ElasticContext> parentContext, @Nullable ClassLoader initiatingClassLoader) {
+ private ErrorCaptureImpl captureException(long epochMicros, @Nullable Throwable e, TraceStateImpl> parentContext, @Nullable ClassLoader initiatingClassLoader) {
if (!isRunning() || e == null) {
return null;
}
@@ -484,10 +494,10 @@ private ErrorCapture captureException(long epochMicros, @Nullable Throwable e, E
// note: if we add inheritance support for exception filtering, caching would be required for performance
if (e != null && !WildcardMatcher.isAnyMatch(coreConfiguration.getIgnoreExceptions(), e.getClass().getName())) {
- ErrorCapture error = errorPool.createInstance();
+ ErrorCaptureImpl error = errorPool.createInstance();
error.withTimestamp(epochMicros);
error.setException(e);
- Transaction currentTransaction = currentTransaction();
+ TransactionImpl currentTransaction = currentTransaction();
if (currentTransaction != null) {
if (currentTransaction.getNameForSerialization().length() > 0) {
error.setTransactionName(currentTransaction.getNameForSerialization());
@@ -495,7 +505,7 @@ private ErrorCapture captureException(long epochMicros, @Nullable Throwable e, E
error.setTransactionType(currentTransaction.getType());
error.setTransactionSampled(currentTransaction.isSampled());
}
- AbstractSpan> parent = parentContext.getSpan();
+ AbstractSpanImpl> parent = parentContext.getSpan();
if (parent != null) {
error.asChildOf(parent);
// don't discard spans leading up to an error, otherwise they'd point to an invalid parent
@@ -508,7 +518,7 @@ private ErrorCapture captureException(long epochMicros, @Nullable Throwable e, E
}
}
parentContext.getBaggage()
- .storeBaggageInContext(error.getContext(), getConfig(CoreConfiguration.class).getBaggageToAttach());
+ .storeBaggageInContext(error.getContext(), getConfig(CoreConfigurationImpl.class).getBaggageToAttach());
return error;
}
return null;
@@ -533,7 +543,7 @@ public T getConfig(Class configProvider) {
return configuration;
}
- public void endTransaction(Transaction transaction) {
+ public void endTransaction(TransactionImpl transaction) {
if (logger.isDebugEnabled()) {
logger.debug("endTransaction {}", transaction);
if (logger.isTraceEnabled()) {
@@ -551,11 +561,11 @@ public void endTransaction(Transaction transaction) {
}
}
- public void reportPartialTransaction(Transaction transaction) {
+ public void reportPartialTransaction(TransactionImpl transaction) {
reporter.reportPartialTransaction(transaction);
}
- public void endSpan(Span span) {
+ public void endSpan(SpanImpl span) {
if (logger.isDebugEnabled()) {
logger.debug("endSpan {}", span);
if (logger.isTraceEnabled()) {
@@ -564,7 +574,7 @@ public void endSpan(Span span) {
}
if (!span.isSampled()) {
- Transaction transaction = span.getTransaction();
+ TransactionImpl transaction = span.getTransaction();
if (transaction != null) {
transaction.captureDroppedSpan(span);
}
@@ -584,7 +594,7 @@ public void endSpan(Span span) {
}
if (span.isDiscarded()) {
logger.debug("Discarding span {}", span);
- Transaction transaction = span.getTransaction();
+ TransactionImpl transaction = span.getTransaction();
if (transaction != null) {
transaction.captureDroppedSpan(span);
}
@@ -595,12 +605,12 @@ public void endSpan(Span span) {
reportSpan(span);
}
- private void reportSpan(Span span) {
- AbstractSpan> parent = span.getParent();
+ private void reportSpan(SpanImpl span) {
+ AbstractSpanImpl> parent = span.getParent();
if (parent != null && parent.isDiscarded()) {
logger.warn("Reporting a child of an discarded span. The current span '{}' will not be shown in the UI. Consider deactivating span_min_duration.", span);
}
- Transaction transaction = span.getTransaction();
+ TransactionImpl transaction = span.getTransaction();
if (transaction != null) {
transaction.getSpanCount().getReported().incrementAndGet();
}
@@ -610,35 +620,35 @@ private void reportSpan(Span span) {
reporter.report(span);
}
- public void endError(ErrorCapture error) {
+ public void endError(ErrorCaptureImpl error) {
reporter.report(error);
}
- public TraceContext createSpanLink() {
+ public TraceContextImpl createSpanLink() {
return spanLinkPool.createInstance();
}
- public Id createProfilingCorrelationStackTraceId() {
+ public IdImpl createProfilingCorrelationStackTraceId() {
return profilingCorrelationStackTraceIdPool.createInstance();
}
- public void recycle(Transaction transaction) {
+ public void recycle(TransactionImpl transaction) {
transactionPool.recycle(transaction);
}
- public void recycle(Span span) {
+ public void recycle(SpanImpl span) {
spanPool.recycle(span);
}
- public void recycle(ErrorCapture error) {
+ public void recycle(ErrorCaptureImpl error) {
errorPool.recycle(error);
}
- public void recycle(TraceContext traceContext) {
+ public void recycle(TraceContextImpl traceContext) {
spanLinkPool.recycle(traceContext);
}
- public void recycleProfilingCorrelationStackTraceId(Id id) {
+ public void recycleProfilingCorrelationStackTraceId(IdImpl id) {
profilingCorrelationStackTraceIdPool.recycle(id);
}
@@ -670,7 +680,7 @@ public synchronized void stop() {
}
//Shutting down logging resets the log level to OFF - subsequent tests in the class will get no log output, hence the guard
if (!assertionsEnabled) {
- LoggingConfiguration.shutdown();
+ LoggingConfigurationImpl.shutdown();
}
}
@@ -687,7 +697,7 @@ public Sampler getSampler() {
}
@Override
- public ObjectPoolFactory getObjectPoolFactory() {
+ public ObjectPoolFactoryImpl getObjectPoolFactory() {
return objectPoolFactory;
}
@@ -729,7 +739,7 @@ void init(List lifecycleListeners) {
* jvm parameter); false otherwise
*/
public synchronized void start(boolean premain) {
- long delayInitMs = getConfig(CoreConfiguration.class).getDelayTracerStartMs();
+ long delayInitMs = getConfig(CoreConfigurationImpl.class).getDelayTracerStartMs();
if (premain && shouldDelayOnPremain()) {
delayInitMs = Math.max(delayInitMs, 5000L);
}
@@ -853,17 +863,15 @@ public boolean isRunning() {
return tracerState == TracerState.RUNNING;
}
- @Override
@Nullable
- public Span createExitChildSpan() {
- AbstractSpan> active = getActive();
+ public SpanImpl createExitChildSpan() {
+ AbstractSpanImpl> active = getActive();
if (active == null) {
return null;
}
return active.createExitSpan();
}
- @Override
public TracerState getState() {
return tracerState;
}
@@ -882,13 +890,13 @@ public T getLifecycleListener(Class listenerClass) {
* @return the currently active context, {@literal null} if there is none.
*/
- public ElasticContext> currentContext() {
+ public TraceStateImpl> currentContext() {
return activeStack.get().currentContext();
}
@Nullable
@Override
- public AbstractSpan> getActive() {
+ public AbstractSpanImpl> getActive() {
return currentContext().getSpan();
}
@@ -901,15 +909,15 @@ public AbstractSpan> getActive() {
* @param wrapper type
* @return newly (or previously) created wrapper
*/
- public > T wrapActiveContextIfRequired(Class wrapperClass, Callable wrapFunction) {
+ public > T wrapActiveContextIfRequired(Class wrapperClass, Callable wrapFunction) {
return activeStack.get().wrapActiveContextIfRequired(wrapperClass, wrapFunction, approximateContextSize);
}
- public void activate(ElasticContext> context) {
+ public void activate(TraceStateImpl> context) {
activeStack.get().activate(context, activationListeners);
}
- public Scope activateInScope(final ElasticContext> context) {
+ public Scope activateInScope(final TraceStateImpl> context) {
// already in scope
if (currentContext() == context) {
return NoopScope.INSTANCE;
@@ -928,7 +936,7 @@ public void close() {
};
}
- public void deactivate(ElasticContext> context) {
+ public void deactivate(TraceStateImpl> context) {
activeStack.get().deactivate(context, activationListeners, assertionsEnabled);
}
@@ -962,7 +970,6 @@ public void setServiceInfoForClassLoader(@Nullable ClassLoader classLoader, Serv
}
@Nullable
- @Override
public ServiceInfo getServiceInfoForClassLoader(@Nullable ClassLoader initiatingClassLoader) {
if (initiatingClassLoader == null) {
return null;
@@ -1040,7 +1047,7 @@ public Service createService(String ephemeralId) {
return new ServiceFactory().createService(
coreConfiguration,
ephemeralId,
- configurationRegistry.getConfig(ServerlessConfiguration.class).runsOnAwsLambda()
+ configurationRegistry.getConfig(ServerlessConfigurationImpl.class).runsOnAwsLambda()
);
}
@@ -1055,7 +1062,7 @@ public Throwable redactExceptionIfRequired(@Nullable Throwable original) {
@Override
public void flush() {
- long flushTimeout = configurationRegistry.getConfig(ServerlessConfiguration.class).getDataFlushTimeout();
+ long flushTimeout = configurationRegistry.getConfig(ServerlessConfigurationImpl.class).getDataFlushTimeout();
try {
if (!reporter.flush(flushTimeout, TimeUnit.MILLISECONDS, true)) {
logger.error("APM data flush haven't completed within {} milliseconds.", flushTimeout);
@@ -1102,9 +1109,35 @@ public void schedule(Runnable job, long interval, TimeUnit timeUnit) {
sharedPool.scheduleAtFixedRate(job, 0, interval, timeUnit);
}
- @Override
public void reportMetric(JsonWriter metrics) {
reporter.reportMetrics(metrics);
}
+ /**
+ * An enumeration used to represent the current tracer state.
+ */
+ public enum TracerState {
+ /**
+ * The agent's state before it has been started for the first time.
+ */
+ UNINITIALIZED,
+
+ /**
+ * Indicates that the agent is currently fully functional - tracing, monitoring and sending data to the APM server.
+ */
+ RUNNING,
+
+ /**
+ * The agent is mostly idle, consuming minimal resources, ready to quickly resume back to RUNNING. When the agent
+ * is PAUSED, it is not tracing and not communicating with the APM server. However, classes are still instrumented
+ * and threads are still alive.
+ */
+ PAUSED,
+
+ /**
+ * Indicates that the agent had been stopped.
+ * NOTE: this state is irreversible- the agent cannot resume if it has already been stopped.
+ */
+ STOPPED
+ }
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
index b68faae5dd..7d422d573f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracerBuilder.java
@@ -20,8 +20,8 @@
import co.elastic.apm.agent.configuration.AgentArgumentsConfigurationSource;
import co.elastic.apm.agent.configuration.ApmServerConfigurationSource;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
-import co.elastic.apm.agent.configuration.MetricsConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.configuration.MetricsConfigurationImpl;
import co.elastic.apm.agent.configuration.PrefixingConfigurationSourceWrapper;
import co.elastic.apm.agent.configuration.source.ConfigSources;
import co.elastic.apm.agent.configuration.source.SystemPropertyConfigurationSource;
@@ -29,14 +29,14 @@
import co.elastic.apm.agent.tracer.LifecycleListener;
import co.elastic.apm.agent.impl.metadata.MetaData;
import co.elastic.apm.agent.impl.metadata.MetaDataFuture;
-import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
-import co.elastic.apm.agent.logging.LoggingConfiguration;
+import co.elastic.apm.agent.impl.stacktrace.StacktraceConfigurationImpl;
+import co.elastic.apm.agent.logging.LoggingConfigurationImpl;
import co.elastic.apm.agent.metrics.MetricRegistry;
import co.elastic.apm.agent.metrics.builtin.AgentReporterMetrics;
-import co.elastic.apm.agent.objectpool.ObjectPoolFactory;
+import co.elastic.apm.agent.objectpool.ObjectPoolFactoryImpl;
import co.elastic.apm.agent.report.ApmServerClient;
import co.elastic.apm.agent.report.Reporter;
-import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.report.ReporterConfigurationImpl;
import co.elastic.apm.agent.report.ReporterFactory;
import co.elastic.apm.agent.report.serialize.DslJsonSerializer;
import co.elastic.apm.agent.report.serialize.SerializationConstants;
@@ -74,7 +74,7 @@ public class ElasticApmTracerBuilder {
@Nullable
private Reporter reporter;
- private ObjectPoolFactory objectPoolFactory;
+ private ObjectPoolFactoryImpl objectPoolFactory;
private final List extraLifecycleListeners;
@@ -98,9 +98,9 @@ public ElasticApmTracerBuilder() {
public ElasticApmTracerBuilder(List configSources) {
this.configSources = configSources;
this.ephemeralId = UUID.randomUUID().toString();
- LoggingConfiguration.init(configSources, ephemeralId);
+ LoggingConfigurationImpl.init(configSources, ephemeralId);
logger = LoggerFactory.getLogger(getClass());
- objectPoolFactory = new ObjectPoolFactory();
+ objectPoolFactory = new ObjectPoolFactoryImpl();
extraLifecycleListeners = new ArrayList<>();
}
@@ -115,7 +115,7 @@ public ElasticApmTracerBuilder reporter(Reporter reporter) {
}
- public ElasticApmTracerBuilder withObjectPoolFactory(ObjectPoolFactory objectPoolFactory) {
+ public ElasticApmTracerBuilder withObjectPoolFactory(ObjectPoolFactoryImpl objectPoolFactory) {
this.objectPoolFactory = objectPoolFactory;
return this;
}
@@ -158,11 +158,11 @@ private ElasticApmTracer build(boolean startTracer) {
apmServerClient = new ApmServerClient(configurationRegistry);
}
- SerializationConstants.init(configurationRegistry.getConfig(CoreConfiguration.class));
+ SerializationConstants.init(configurationRegistry.getConfig(CoreConfigurationImpl.class));
MetaDataFuture metaDataFuture = MetaData.create(configurationRegistry, ephemeralId);
DslJsonSerializer payloadSerializer = new DslJsonSerializer(
- configurationRegistry.getConfig(StacktraceConfiguration.class),
+ configurationRegistry.getConfig(StacktraceConfigurationImpl.class),
apmServerClient,
metaDataFuture
);
@@ -178,8 +178,8 @@ private ElasticApmTracer build(boolean startTracer) {
lifecycleListeners.add(configurationSource);
}
- MetricsConfiguration metricsConfig = configurationRegistry.getConfig(MetricsConfiguration.class);
- MetricRegistry metricRegistry = new MetricRegistry(configurationRegistry.getConfig(ReporterConfiguration.class), metricsConfig);
+ MetricsConfigurationImpl metricsConfig = configurationRegistry.getConfig(MetricsConfigurationImpl.class);
+ MetricRegistry metricRegistry = new MetricRegistry(configurationRegistry.getConfig(ReporterConfigurationImpl.class), metricsConfig);
if (reporter == null) {
AgentReporterMetrics healthMetrics = new AgentReporterMetrics(metricRegistry, metricsConfig);
@@ -229,9 +229,9 @@ private ConfigurationRegistry getDefaultConfigurationRegistry(List getConfigSources(@Nullable String agentA
// Optionally loading agent configuration from external file, while it depends on sources above, it has higher
// priority and is thus inserted before them.
- String configFileLocation = CoreConfiguration.getConfigFileLocation(result, premain);
+ String configFileLocation = CoreConfigurationImpl.getConfigFileLocation(result, premain);
ConfigurationSource configFileSource = ConfigSources.fromFileSystem(configFileLocation);
if (configFileSource != null) {
result.add(0, configFileSource);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyElasticContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyTraceState.java
similarity index 73%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyElasticContext.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyTraceState.java
index cac09a1c49..bf7782b8a8 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyElasticContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/EmptyTraceState.java
@@ -18,27 +18,27 @@
*/
package co.elastic.apm.agent.impl;
-import co.elastic.apm.agent.impl.baggage.Baggage;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.ElasticContext;
+import co.elastic.apm.agent.impl.baggage.BaggageImpl;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
+import co.elastic.apm.agent.impl.transaction.TraceStateImpl;
import javax.annotation.Nullable;
-class EmptyElasticContext extends ElasticContext {
+class EmptyTraceState extends TraceStateImpl {
- EmptyElasticContext(ElasticApmTracer tracer) {
+ EmptyTraceState(ElasticApmTracer tracer) {
super(tracer);
}
@Nullable
@Override
- public AbstractSpan> getSpan() {
+ public AbstractSpanImpl> getSpan() {
return null;
}
@Override
- public Baggage getBaggage() {
- return Baggage.EMPTY;
+ public BaggageImpl getBaggage() {
+ return BaggageImpl.EMPTY;
}
@Override
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/Tracer.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/Tracer.java
deleted file mode 100644
index f645420cd9..0000000000
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/Tracer.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.impl;
-
-import co.elastic.apm.agent.tracer.service.ServiceInfo;
-import co.elastic.apm.agent.impl.baggage.Baggage;
-import co.elastic.apm.agent.impl.error.ErrorCapture;
-import co.elastic.apm.agent.impl.sampling.Sampler;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.ElasticContext;
-import co.elastic.apm.agent.impl.transaction.Span;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.tracer.dispatch.HeaderGetter;
-
-import javax.annotation.Nullable;
-
-public interface Tracer extends co.elastic.apm.agent.tracer.service.ServiceAwareTracer, co.elastic.apm.agent.tracer.Tracer {
-
- @Nullable
- @Override
- Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader);
-
- @Nullable
- Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader, long epochMicro);
-
- @Nullable
- Transaction startRootTransaction(@Nullable ClassLoader initiatingClassLoader, Baggage baseBaggage, long epochMicro);
-
- /**
- * Starts a trace-root transaction with a specified sampler and start timestamp
- *
- * @param sampler the {@link Sampler} instance which is responsible for determining the sampling decision if this is a root transaction
- * @param epochMicros the start timestamp
- * @param initiatingClassLoader the class loader corresponding to the service which initiated the creation of the transaction.
- * Used to determine the service name and to load application-scoped classes like the {@link org.slf4j.MDC},
- * for log correlation.
- * @return a transaction that will be the root of the current trace if the agent is currently RUNNING; null otherwise
- */
- @Nullable
- Transaction startRootTransaction(Sampler sampler, long epochMicros, Baggage baseBaggage, @Nullable ClassLoader initiatingClassLoader);
-
- @Override
- @Nullable
- Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, @Nullable ClassLoader initiatingClassLoader);
-
- @Nullable
- Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, @Nullable ClassLoader initiatingClassLoader, Baggage baseBaggage, long epochMicros);
-
- /**
- * Starts a transaction as a child of the context headers obtained through the provided {@link HeaderGetter}.
- * If the created transaction cannot be started as a child transaction (for example - if no parent context header is
- * available), then it will be started as the root transaction of the trace.
- *
- * @param headerCarrier the Object from which context headers can be obtained, typically a request or a message
- * @param headersGetter provides the trace context headers required in order to create a child transaction
- * @param sampler the {@link Sampler} instance which is responsible for determining the sampling decision if this is a root transaction
- * @param epochMicros the start timestamp
- * @param initiatingClassLoader the class loader corresponding to the service which initiated the creation of the transaction.
- * Used to determine the service name and to load application-scoped classes like the {@link org.slf4j.MDC},
- * for log correlation.
- * @return a transaction which is a child of the provided parent if the agent is currently RUNNING; null otherwise
- */
- @Nullable
- Transaction startChildTransaction(@Nullable C headerCarrier, HeaderGetter headersGetter, Sampler sampler,
- long epochMicros, @Nullable ClassLoader initiatingClassLoader);
-
-
- @Override
- ElasticContext> currentContext();
-
- @Override
- @Nullable
- AbstractSpan> getActive();
-
- @Override
- @Nullable
- Transaction currentTransaction();
-
-
- /**
- * Captures an exception without providing an explicit reference to a parent {@link AbstractSpan}
- *
- * @param e the exception to capture
- * @param initiatingClassLoader the class
- */
- void captureAndReportException(@Nullable Throwable e, ClassLoader initiatingClassLoader);
-
- @Nullable
- String captureAndReportException(long epochMicros, @Nullable Throwable e, ElasticContext> parentContext);
-
- @Nullable
- ErrorCapture captureException(@Nullable Throwable e, ElasticContext> parentContext, @Nullable ClassLoader initiatingClassLoader);
-
- TracerState getState();
-
- @Nullable
- ServiceInfo getServiceInfoForClassLoader(@Nullable ClassLoader classLoader);
-
- /**
- * Sets the service name and version for all {@link Transaction}s,
- * {@link Span}s and {@link ErrorCapture}s which are created by the service which corresponds to the provided {@link ClassLoader}.
- *
- * The main use case is being able to differentiate between multiple services deployed to the same application server.
- *
- *
- * @param classLoader the class loader which corresponds to a particular service
- * @param serviceInfo the service name and version for this class loader
- */
- void setServiceInfoForClassLoader(@Nullable ClassLoader classLoader, ServiceInfo serviceInfo);
-
- /**
- * Called when the container shuts down.
- * Cleans up thread pools and other resources.
- */
- void stop();
-
- @Override
- boolean isRunning();
-
- @Nullable
- Span createExitChildSpan();
-
- /**
- * An enumeration used to represent the current tracer state.
- */
- enum TracerState {
- /**
- * The agent's state before it has been started for the first time.
- */
- UNINITIALIZED,
-
- /**
- * Indicates that the agent is currently fully functional - tracing, monitoring and sending data to the APM server.
- */
- RUNNING,
-
- /**
- * The agent is mostly idle, consuming minimal resources, ready to quickly resume back to RUNNING. When the agent
- * is PAUSED, it is not tracing and not communicating with the APM server. However, classes are still instrumented
- * and threads are still alive.
- */
- PAUSED,
-
- /**
- * Indicates that the agent had been stopped.
- * NOTE: this state is irreversible- the agent cannot resume if it has already been stopped.
- */
- STOPPED
- }
-}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java
index 1a8394a36e..fd3e7e84b6 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/TracerConfiguration.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.impl;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import org.stagemonitor.configuration.ConfigurationOption;
import org.stagemonitor.configuration.ConfigurationOptionProvider;
@@ -29,7 +29,7 @@ public class TracerConfiguration extends ConfigurationOptionProvider {
.key(RECORDING)
.aliasKeys("active")
.tags("added[1.15.0]")
- .configurationCategory(CoreConfiguration.CORE_CATEGORY)
+ .configurationCategory(CoreConfigurationImpl.CORE_CATEGORY)
.description("NOTE: This option was available in older versions through the `active` key. The old key is still \n" +
"supported in newer versions, but it is now deprecated.\n" +
"\n" +
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageContext.java
index 831b731ade..d757a032ef 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageContext.java
@@ -18,19 +18,19 @@
*/
package co.elastic.apm.agent.impl.baggage;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.ElasticContext;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
+import co.elastic.apm.agent.impl.transaction.TraceStateImpl;
import co.elastic.apm.agent.tracer.BaggageContextBuilder;
import javax.annotation.Nullable;
-public class BaggageContext extends ElasticContext {
+public class BaggageContext extends TraceStateImpl {
@Nullable
- private final AbstractSpan> span;
- private final Baggage baggage;
+ private final AbstractSpanImpl> span;
+ private final BaggageImpl baggage;
- private BaggageContext(ElasticContext> parent, Baggage baggage) {
+ private BaggageContext(TraceStateImpl> parent, BaggageImpl baggage) {
super(parent.getTracer());
this.span = parent.getSpan();
this.baggage = baggage;
@@ -38,12 +38,12 @@ private BaggageContext(ElasticContext> parent, Baggage baggage) {
@Nullable
@Override
- public AbstractSpan> getSpan() {
+ public AbstractSpanImpl> getSpan() {
return span;
}
@Override
- public Baggage getBaggage() {
+ public BaggageImpl getBaggage() {
return baggage;
}
@@ -61,16 +61,16 @@ public void decrementReferences() {
}
}
- public static BaggageContext.Builder createBuilder(ElasticContext> parent) {
+ public static BaggageContext.Builder createBuilder(TraceStateImpl> parent) {
return new Builder(parent);
}
public static class Builder implements BaggageContextBuilder {
- private final ElasticContext> parent;
- private final Baggage.Builder baggageBuilder;
+ private final TraceStateImpl> parent;
+ private final BaggageImpl.Builder baggageBuilder;
- public Builder(ElasticContext> parent) {
+ public Builder(TraceStateImpl> parent) {
this.parent = parent;
this.baggageBuilder = parent.getBaggage().toBuilder();
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/Baggage.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageImpl.java
similarity index 89%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/Baggage.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageImpl.java
index cecfe45f9e..88934639d5 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/Baggage.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/BaggageImpl.java
@@ -19,8 +19,9 @@
package co.elastic.apm.agent.impl.baggage;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.impl.context.AbstractContext;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
+import co.elastic.apm.agent.impl.context.AbstractContextImpl;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
+import co.elastic.apm.agent.tracer.Baggage;
import javax.annotation.Nullable;
import java.nio.charset.StandardCharsets;
@@ -32,11 +33,11 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-public class Baggage implements co.elastic.apm.agent.tracer.Baggage {
+public class BaggageImpl implements Baggage {
private static final String LIFTED_BAGGAGE_ATTRIBUTE_PREFIX = "baggage.";
- public static final Baggage EMPTY = new Baggage(Collections.emptyMap(), Collections.emptyMap());
+ public static final BaggageImpl EMPTY = new BaggageImpl(Collections.emptyMap(), Collections.emptyMap());
private final Map baggage;
@@ -53,7 +54,7 @@ public class Baggage implements co.elastic.apm.agent.tracer.Baggage {
* When automatically lifting baggage entries to be stored as span attributes we add the {@link #LIFTED_BAGGAGE_ATTRIBUTE_PREFIX}
* to the key.
* Because baggage is usually updated rarely but the lifting can happen for very many spans we cache the prefixed string in this map.
- * See {@link #storeBaggageInAttributes(AbstractSpan, List)} for the implementation details.
+ * See {@link #storeBaggageInAttributes(AbstractSpanImpl, List)} for the implementation details.
*/
private volatile ConcurrentHashMap cachedKeysWithPrefix;
@@ -67,7 +68,7 @@ public class Baggage implements co.elastic.apm.agent.tracer.Baggage {
*/
byte[] cachedSerializedW3CHeaderUtf8 = null;
- private Baggage(Map baggage, Map baggageMetadata) {
+ private BaggageImpl(Map baggage, Map baggageMetadata) {
this.baggage = baggage;
this.baggageMetadata = baggageMetadata;
}
@@ -122,7 +123,7 @@ byte[] getCachedSerializedW3CHeaderUtf8() {
return this.cachedSerializedW3CHeaderUtf8;
}
- public void storeBaggageInAttributes(AbstractSpan> span, List keyFilter) {
+ public void storeBaggageInAttributes(AbstractSpanImpl> span, List keyFilter) {
if (baggage.isEmpty() || keyFilter.isEmpty()) {
// early out to prevent unnecessarily allocating an iterator
return;
@@ -136,7 +137,7 @@ public void storeBaggageInAttributes(AbstractSpan> span, List
}
}
- public void storeBaggageInContext(AbstractContext context, List keyFilter) {
+ public void storeBaggageInContext(AbstractContextImpl context, List keyFilter) {
if (baggage.isEmpty() || keyFilter.isEmpty()) {
// early out to prevent unnecessarily allocating an iterator
return;
@@ -168,7 +169,7 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
- Baggage baggage1 = (Baggage) o;
+ BaggageImpl baggage1 = (BaggageImpl) o;
if (!baggage.equals(baggage1.baggage)) return false;
return baggageMetadata.equals(baggage1.baggageMetadata);
@@ -183,14 +184,14 @@ public int hashCode() {
public static class Builder {
- public Builder(Baggage parent) {
+ public Builder(BaggageImpl parent) {
this.parent = parent;
this.baggage = parent.baggage;
this.baggageMetadata = parent.baggageMetadata;
buildCalled = false;
}
- private final Baggage parent;
+ private final BaggageImpl parent;
private Map baggage;
private Map baggageMetadata;
@@ -221,7 +222,7 @@ public Builder put(String key, @Nullable String value, @Nullable String metadata
*
* @return a baggage resulting from this builder.
*/
- public Baggage build() {
+ public BaggageImpl build() {
buildCalled = true;
boolean anyModifications = false;
if (baggage != parent.baggage) {
@@ -233,7 +234,7 @@ public Baggage build() {
baggageMetadata = Collections.unmodifiableMap(baggageMetadata);
}
if (anyModifications) {
- return new Baggage(baggage, baggageMetadata);
+ return new BaggageImpl(baggage, baggageMetadata);
} else {
return parent;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/W3CBaggagePropagation.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/W3CBaggagePropagation.java
index 6a52a1712d..dcd498deb8 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/W3CBaggagePropagation.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/W3CBaggagePropagation.java
@@ -40,9 +40,9 @@ public class W3CBaggagePropagation {
public static final String BAGGAGE_HEADER_NAME = "baggage";
- private static final HeaderGetter.HeaderConsumer STRING_PARSING_CONSUMER = new HeaderGetter.HeaderConsumer() {
+ private static final HeaderGetter.HeaderConsumer STRING_PARSING_CONSUMER = new HeaderGetter.HeaderConsumer() {
@Override
- public void accept(@Nullable String headerValue, Baggage.Builder state) {
+ public void accept(@Nullable String headerValue, BaggageImpl.Builder state) {
if (headerValue != null) {
try {
new Parser(headerValue).parseInto(state);
@@ -54,9 +54,9 @@ public void accept(@Nullable String headerValue, Baggage.Builder state) {
};
- private static final HeaderGetter.HeaderConsumer UTF8_BYTES_PARSING_CONSUMER = new HeaderGetter.HeaderConsumer() {
+ private static final HeaderGetter.HeaderConsumer UTF8_BYTES_PARSING_CONSUMER = new HeaderGetter.HeaderConsumer() {
@Override
- public void accept(@Nullable byte[] headerValue, Baggage.Builder state) {
+ public void accept(@Nullable byte[] headerValue, BaggageImpl.Builder state) {
if (headerValue != null) {
try {
STRING_PARSING_CONSUMER.accept(new String(headerValue, StandardCharsets.UTF_8), state);
@@ -68,19 +68,19 @@ public void accept(@Nullable byte[] headerValue, Baggage.Builder state) {
};
@SuppressWarnings("unchecked")
- public static void parse(C carrier, HeaderGetter headerGetter, Baggage.Builder into) {
- HeaderGetter.HeaderConsumer consumer;
+ public static void parse(C carrier, HeaderGetter headerGetter, BaggageImpl.Builder into) {
+ HeaderGetter.HeaderConsumer consumer;
if (headerGetter instanceof TextHeaderGetter) {
- consumer = (HeaderGetter.HeaderConsumer) STRING_PARSING_CONSUMER;
+ consumer = (HeaderGetter.HeaderConsumer) STRING_PARSING_CONSUMER;
} else if (headerGetter instanceof UTF8ByteHeaderGetter) {
- consumer = (HeaderGetter.HeaderConsumer) UTF8_BYTES_PARSING_CONSUMER;
+ consumer = (HeaderGetter.HeaderConsumer) UTF8_BYTES_PARSING_CONSUMER;
} else {
throw new IllegalArgumentException("HeaderGetter must be either a TextHeaderGetter or UTF8ByteHeaderGetter: " + headerGetter.getClass().getName());
}
headerGetter.forEach(BAGGAGE_HEADER_NAME, carrier, into, consumer);
}
- public static void propagate(Baggage baggage, C carrier, HeaderSetter setter) {
+ public static void propagate(BaggageImpl baggage, C carrier, HeaderSetter setter) {
if (baggage.isEmpty()) {
return;
}
@@ -91,7 +91,7 @@ public static void propagate(Baggage baggage, C carrier, HeaderSetter T getTextHeader(Baggage baggage, HeaderSetter setter) {
+ private static T getTextHeader(BaggageImpl baggage, HeaderSetter setter) {
if (setter instanceof TextHeaderSetter) {
return (T) getTextHeaderString(baggage);
} else if (setter instanceof UTF8ByteHeaderSetter) {
@@ -102,13 +102,13 @@ private static T getTextHeader(Baggage baggage, HeaderSetter setter) {
}
@Nullable
- private static byte[] getTextHeaderUtf8Bytes(Baggage baggage) {
+ private static byte[] getTextHeaderUtf8Bytes(BaggageImpl baggage) {
getTextHeaderString(baggage); //ensures that the string-header is computed and cached
return baggage.getCachedSerializedW3CHeaderUtf8();
}
@Nullable
- private static String getTextHeaderString(Baggage baggage) {
+ private static String getTextHeaderString(BaggageImpl baggage) {
String header = baggage.getCachedSerializedW3CHeader();
if (header == null) {
header = encodeToHeader(baggage);
@@ -121,7 +121,7 @@ private static String getTextHeaderString(Baggage baggage) {
}
- private static String encodeToHeader(Baggage baggage) {
+ private static String encodeToHeader(BaggageImpl baggage) {
StringBuilder header = new StringBuilder();
for (String key : baggage.keys()) {
String value = baggage.get(key);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/otel/Parser.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/otel/Parser.java
index d797defbb8..519899291a 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/otel/Parser.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/baggage/otel/Parser.java
@@ -26,7 +26,7 @@
package co.elastic.apm.agent.impl.baggage.otel;
-import co.elastic.apm.agent.impl.baggage.Baggage;
+import co.elastic.apm.agent.impl.baggage.BaggageImpl;
import javax.annotation.Nullable;
import java.nio.charset.StandardCharsets;
@@ -63,7 +63,7 @@ public Parser(String baggageHeader) {
reset(0);
}
- public void parseInto(Baggage.Builder baggageBuilder) {
+ public void parseInto(BaggageImpl.Builder baggageBuilder) {
for (int i = 0, n = baggageHeader.length(); i < n; i++) {
char current = baggageHeader.charAt(i);
@@ -141,7 +141,7 @@ public void parseInto(Baggage.Builder baggageBuilder) {
}
private static void putBaggage(
- Baggage.Builder baggage,
+ BaggageImpl.Builder baggage,
@Nullable String key,
@Nullable String value,
@Nullable String metadataValue) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContextImpl.java
similarity index 89%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContext.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContextImpl.java
index afcd86a802..de6b883c37 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/AbstractContextImpl.java
@@ -18,6 +18,7 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.AbstractContext;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
@@ -25,7 +26,7 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-public abstract class AbstractContext implements Recyclable, co.elastic.apm.agent.tracer.AbstractContext {
+public abstract class AbstractContextImpl implements Recyclable, AbstractContext {
public static final String REDACTED_CONTEXT_STRING = "[REDACTED]";
@@ -41,7 +42,7 @@ public abstract class AbstractContext implements Recyclable, co.elastic.apm.agen
/**
* An object containing contextual data for Messages (incoming in case of transactions or outgoing in case of spans)
*/
- private final Message message = new Message();
+ private final MessageImpl message = new MessageImpl();
public Iterator extends Map.Entry> getLabelIterator() {
return labels.entrySet().iterator();
@@ -73,7 +74,7 @@ public boolean hasLabels() {
}
@Override
- public Message getMessage() {
+ public MessageImpl getMessage() {
return message;
}
@@ -87,7 +88,7 @@ public boolean hasContent() {
return !labels.isEmpty() || message.hasContent();
}
- public void copyFrom(AbstractContext other) {
+ public void copyFrom(AbstractContextImpl other) {
labels.putAll(other.labels);
message.copyFrom(other.message);
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/BodyProcessor.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/BodyProcessor.java
index 12af85bff8..f68508ad0c 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/BodyProcessor.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/BodyProcessor.java
@@ -18,10 +18,10 @@
*/
package co.elastic.apm.agent.impl.context;
-import co.elastic.apm.agent.impl.error.ErrorCapture;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.impl.error.ErrorCaptureImpl;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
import co.elastic.apm.agent.report.processor.Processor;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import org.stagemonitor.configuration.ConfigurationRegistry;
import static co.elastic.apm.agent.tracer.configuration.CoreConfiguration.EventType.ALL;
@@ -29,30 +29,30 @@
import static co.elastic.apm.agent.tracer.configuration.CoreConfiguration.EventType.TRANSACTIONS;
/**
- * This processor redacts the body according to the {@link co.elastic.apm.agent.configuration.CoreConfiguration#captureBody}
+ * This processor redacts the body according to the {@link CoreConfigurationImpl#captureBody}
* configuration option
*/
@SuppressWarnings("JavadocReference")
public class BodyProcessor implements Processor {
- private final CoreConfiguration coreConfiguration;
+ private final CoreConfigurationImpl coreConfiguration;
public BodyProcessor(ConfigurationRegistry configurationRegistry) {
- coreConfiguration = configurationRegistry.getConfig(CoreConfiguration.class);
+ coreConfiguration = configurationRegistry.getConfig(CoreConfigurationImpl.class);
}
@Override
- public void processBeforeReport(Transaction transaction) {
+ public void processBeforeReport(TransactionImpl transaction) {
redactBodyIfNecessary(transaction.getContext(), TRANSACTIONS);
}
@Override
- public void processBeforeReport(ErrorCapture error) {
+ public void processBeforeReport(ErrorCaptureImpl error) {
redactBodyIfNecessary(error.getContext(), ERRORS);
}
- private void redactBodyIfNecessary(TransactionContext context, CoreConfiguration.EventType eventType) {
- final CoreConfiguration.EventType eventTypeConfig = coreConfiguration.getCaptureBody();
+ private void redactBodyIfNecessary(TransactionContextImpl context, CoreConfigurationImpl.EventType eventType) {
+ final CoreConfigurationImpl.EventType eventTypeConfig = coreConfiguration.getCaptureBody();
if (eventTypeConfig != eventType && eventTypeConfig != ALL) {
if (context.getRequest().getBody() != null) {
context.getRequest().redactBody();
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOrigin.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOriginImpl.java
similarity index 83%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOrigin.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOriginImpl.java
index 3dbcd57f8b..d5eca191a9 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOrigin.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/CloudOriginImpl.java
@@ -18,11 +18,12 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.CloudOrigin;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
-public class CloudOrigin implements Recyclable, co.elastic.apm.agent.tracer.metadata.CloudOrigin {
+public class CloudOriginImpl implements Recyclable, CloudOrigin {
@Nullable
protected String accountId;
@@ -42,7 +43,7 @@ public String getAccountId() {
}
@Override
- public CloudOrigin withAccountId(@Nullable String accountId) {
+ public CloudOriginImpl withAccountId(@Nullable String accountId) {
this.accountId = accountId;
return this;
}
@@ -53,7 +54,7 @@ public String getProvider() {
}
@Override
- public CloudOrigin withProvider(@Nullable String provider) {
+ public CloudOriginImpl withProvider(@Nullable String provider) {
this.provider = provider;
return this;
}
@@ -64,7 +65,7 @@ public String getRegion() {
}
@Override
- public CloudOrigin withRegion(@Nullable String region) {
+ public CloudOriginImpl withRegion(@Nullable String region) {
this.region = region;
return this;
}
@@ -75,7 +76,7 @@ public String getServiceName() {
}
@Override
- public CloudOrigin withServiceName(@Nullable String serviceName) {
+ public CloudOriginImpl withServiceName(@Nullable String serviceName) {
this.serviceName = serviceName;
return this;
}
@@ -95,7 +96,7 @@ public boolean hasContent() {
serviceName != null;
}
- public void copyFrom(CloudOrigin other) {
+ public void copyFrom(CloudOriginImpl other) {
accountId = other.accountId;
provider = other.provider;
region = other.region;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Db.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DbImpl.java
similarity index 88%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Db.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DbImpl.java
index e2f5825b75..ea5090c4c4 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Db.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DbImpl.java
@@ -18,10 +18,11 @@
*/
package co.elastic.apm.agent.impl.context;
-import co.elastic.apm.agent.objectpool.ObjectPool;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool;
import co.elastic.apm.agent.objectpool.Resetter;
import co.elastic.apm.agent.report.serialize.SerializationConstants;
+import co.elastic.apm.agent.tracer.metadata.Db;
import co.elastic.apm.agent.tracer.pooling.Allocator;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import org.jctools.queues.atomic.MpmcAtomicArrayQueue;
@@ -30,9 +31,9 @@
import java.nio.Buffer;
import java.nio.CharBuffer;
-public class Db implements Recyclable, co.elastic.apm.agent.tracer.metadata.Db {
+public class DbImpl implements Recyclable, Db {
- private static final ObjectPool charBufferPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
+ private static final ObservableObjectPool charBufferPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
new Allocator() {
@Override
public CharBuffer createInstance() {
@@ -91,7 +92,7 @@ public String getInstance() {
}
@Override
- public Db withInstance(@Nullable String instance) {
+ public DbImpl withInstance(@Nullable String instance) {
this.instance = instance;
return this;
}
@@ -105,7 +106,7 @@ public String getStatement() {
}
@Override
- public Db withStatement(@Nullable String statement) {
+ public DbImpl withStatement(@Nullable String statement) {
this.statement = statement;
return this;
}
@@ -133,7 +134,7 @@ public String getType() {
}
@Override
- public Db withType(@Nullable String type) {
+ public DbImpl withType(@Nullable String type) {
this.type = type;
return this;
}
@@ -147,7 +148,7 @@ public String getUser() {
}
@Override
- public Db withUser(@Nullable String user) {
+ public DbImpl withUser(@Nullable String user) {
this.user = user;
return this;
}
@@ -163,7 +164,7 @@ public String getDbLink() {
/**
* DB Link for connections between 2 databases
*/
- public Db withDbLink(@Nullable String dbLink) {
+ public DbImpl withDbLink(@Nullable String dbLink) {
this.dbLink = dbLink;
return this;
}
@@ -176,7 +177,7 @@ public long getAffectedRowsCount(){
}
@Override
- public Db withAffectedRowsCount(long count){
+ public DbImpl withAffectedRowsCount(long count){
this.affectedRowsCount = count;
return this;
}
@@ -204,7 +205,7 @@ public boolean hasContent() {
statementBuffer != null;
}
- public void copyFrom(Db other) {
+ public void copyFrom(DbImpl other) {
instance = other.instance;
statement = other.statement;
type = other.type;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Destination.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DestinationImpl.java
similarity index 84%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Destination.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DestinationImpl.java
index 2152dc2c18..1cc0b359b5 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Destination.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/DestinationImpl.java
@@ -18,6 +18,8 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.Cloud;
+import co.elastic.apm.agent.tracer.metadata.Destination;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
@@ -25,7 +27,7 @@
import java.net.InetSocketAddress;
import java.net.SocketAddress;
-public class Destination implements Recyclable, co.elastic.apm.agent.tracer.metadata.Destination {
+public class DestinationImpl implements Recyclable, Destination {
/**
* An IP (v4 or v6) or a host/domain name.
@@ -42,14 +44,14 @@ public class Destination implements Recyclable, co.elastic.apm.agent.tracer.meta
private boolean portSetByUser;
@Override
- public Destination withAddress(@Nullable CharSequence address) {
+ public DestinationImpl withAddress(@Nullable CharSequence address) {
if (address != null && !addressSetByUser) {
withAddress(address, 0, address.length());
}
return this;
}
- public Destination withUserAddress(@Nullable CharSequence address) {
+ public DestinationImpl withUserAddress(@Nullable CharSequence address) {
if (address == null || address.length() == 0) {
this.address.setLength(0);
} else {
@@ -64,14 +66,14 @@ public StringBuilder getAddress() {
}
@Override
- public Destination withPort(int port) {
+ public DestinationImpl withPort(int port) {
if (!portSetByUser) {
this.port = port;
}
return this;
}
- public Destination withUserPort(int port) {
+ public DestinationImpl withUserPort(int port) {
withPort(port);
portSetByUser = true;
return this;
@@ -82,7 +84,7 @@ public int getPort() {
}
@Override
- public Destination withAddressPort(@Nullable String addressPort) {
+ public DestinationImpl withAddressPort(@Nullable String addressPort) {
if (addressPort != null) {
int separator = addressPort.lastIndexOf(':');
if (separator > 0) {
@@ -137,10 +139,10 @@ private void withAddress(CharSequence address, int start, int end) {
}
}
- private final Cloud cloud = new Cloud();
+ private final CloudImpl cloud = new CloudImpl();
@Override
- public Cloud getCloud() {
+ public CloudImpl getCloud() {
return cloud;
}
@@ -159,7 +161,7 @@ public void resetState() {
}
@Override
- public Destination withSocketAddress(SocketAddress socketAddress) {
+ public DestinationImpl withSocketAddress(SocketAddress socketAddress) {
if (socketAddress instanceof InetSocketAddress) {
withInetSocketAddress((InetSocketAddress) socketAddress);
}
@@ -167,7 +169,7 @@ public Destination withSocketAddress(SocketAddress socketAddress) {
}
@Override
- public Destination withInetSocketAddress(InetSocketAddress inetSocketAddress) {
+ public DestinationImpl withInetSocketAddress(InetSocketAddress inetSocketAddress) {
InetAddress inetAddress = inetSocketAddress.getAddress();
if (inetAddress != null) {
withInetAddress(inetAddress);
@@ -179,16 +181,16 @@ public Destination withInetSocketAddress(InetSocketAddress inetSocketAddress) {
}
@Override
- public Destination withInetAddress(InetAddress inetAddress) {
+ public DestinationImpl withInetAddress(InetAddress inetAddress) {
withAddress(inetAddress.getHostAddress());
return this;
}
- public static class Cloud implements Recyclable, co.elastic.apm.agent.tracer.metadata.Cloud {
+ public static class CloudImpl implements Recyclable, Cloud {
private final StringBuilder region = new StringBuilder();
@Override
- public Cloud withRegion(@Nullable String region) {
+ public CloudImpl withRegion(@Nullable String region) {
this.region.setLength(0);
if (region != null) {
this.region.append(region);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Http.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/HttpImpl.java
similarity index 83%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Http.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/HttpImpl.java
index 0af4652db8..4995e3ef51 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Http.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/HttpImpl.java
@@ -18,16 +18,17 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.Http;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
-public class Http implements Recyclable, co.elastic.apm.agent.tracer.metadata.Http {
+public class HttpImpl implements Recyclable, Http {
/**
* URL used by this HTTP outgoing span
*/
- private final Url url = new Url();
+ private final UrlImpl url = new UrlImpl();
/**
* HTTP method used by this HTTP outgoing span
@@ -48,9 +49,9 @@ public CharSequence getUrl() {
}
/**
- * @return internal {@link Url} instance
+ * @return internal {@link UrlImpl} instance
*/
- public Url getInternalUrl() {
+ public UrlImpl getInternalUrl() {
return url;
}
@@ -65,7 +66,7 @@ public int getStatusCode() {
}
@Override
- public Http withUrl(@Nullable String url) {
+ public HttpImpl withUrl(@Nullable String url) {
if (url != null) {
this.url.withFull(url);
}
@@ -73,13 +74,13 @@ public Http withUrl(@Nullable String url) {
}
@Override
- public Http withMethod(String method) {
+ public HttpImpl withMethod(String method) {
this.method = method;
return this;
}
@Override
- public Http withStatusCode(int statusCode) {
+ public HttpImpl withStatusCode(int statusCode) {
this.statusCode = statusCode;
return this;
}
@@ -97,7 +98,7 @@ public boolean hasContent() {
statusCode > 0;
}
- public void copyFrom(Http other) {
+ public void copyFrom(HttpImpl other) {
url.copyFrom(other.url);
method = other.method;
statusCode = other.statusCode;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Message.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/MessageImpl.java
similarity index 82%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Message.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/MessageImpl.java
index aa45d22ed5..e2af0dba7d 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Message.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/MessageImpl.java
@@ -18,20 +18,21 @@
*/
package co.elastic.apm.agent.impl.context;
-import co.elastic.apm.agent.objectpool.ObjectPool;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool;
import co.elastic.apm.agent.objectpool.Resetter;
+import co.elastic.apm.agent.tracer.metadata.Message;
import co.elastic.apm.agent.tracer.pooling.Allocator;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import org.jctools.queues.atomic.MpmcAtomicArrayQueue;
import javax.annotation.Nullable;
-import static co.elastic.apm.agent.impl.context.AbstractContext.REDACTED_CONTEXT_STRING;
+import static co.elastic.apm.agent.impl.context.AbstractContextImpl.REDACTED_CONTEXT_STRING;
-public class Message implements Recyclable, co.elastic.apm.agent.tracer.metadata.Message {
+public class MessageImpl implements Recyclable, Message {
- private static final ObjectPool stringBuilderPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
+ private static final ObservableObjectPool stringBuilderPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
new Allocator() {
@Override
public StringBuilder createInstance() {
@@ -71,13 +72,13 @@ public String getQueueName() {
}
@Override
- public Message withQueue(@Nullable String queueName) {
+ public MessageImpl withQueue(@Nullable String queueName) {
this.queueName = queueName;
return this;
}
@Override
- public Message withRoutingKey(String routingKey) {
+ public MessageImpl withRoutingKey(String routingKey) {
this.routingKey = routingKey;
return this;
}
@@ -109,7 +110,7 @@ public StringBuilder getBodyForRead() {
}
@Override
- public Message withBody(@Nullable String body) {
+ public MessageImpl withBody(@Nullable String body) {
StringBuilder thisBody = getBodyForWrite();
thisBody.setLength(0);
thisBody.append(body);
@@ -117,7 +118,7 @@ public Message withBody(@Nullable String body) {
}
@Override
- public Message appendToBody(CharSequence bodyContent) {
+ public MessageImpl appendToBody(CharSequence bodyContent) {
getBodyForWrite().append(bodyContent);
return this;
}
@@ -130,13 +131,13 @@ public void redactBody() {
}
@Override
- public Message addHeader(@Nullable String key, @Nullable String value) {
+ public MessageImpl addHeader(@Nullable String key, @Nullable String value) {
headers.add(key, value);
return this;
}
@Override
- public Message addHeader(@Nullable String key, @Nullable byte[] value) {
+ public MessageImpl addHeader(@Nullable String key, @Nullable byte[] value) {
headers.add(key, value);
return this;
}
@@ -147,7 +148,7 @@ public long getAge() {
@SuppressWarnings("UnusedReturnValue")
@Override
- public Message withAge(long age) {
+ public MessageImpl withAge(long age) {
this.age = age;
return this;
}
@@ -172,7 +173,7 @@ public void resetState() {
routingKey = null;
}
- public void copyFrom(Message other) {
+ public void copyFrom(MessageImpl other) {
resetState();
this.queueName = other.getQueueName();
if (other.body != null) {
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/RequestImpl.java
similarity index 86%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/RequestImpl.java
index a6d2694b4e..ad8af7fd77 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Request.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/RequestImpl.java
@@ -18,11 +18,12 @@
*/
package co.elastic.apm.agent.impl.context;
-import co.elastic.apm.agent.objectpool.ObjectPool;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
import co.elastic.apm.agent.objectpool.Resetter;
import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool;
import co.elastic.apm.agent.report.serialize.SerializationConstants;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
+import co.elastic.apm.agent.tracer.metadata.Request;
import co.elastic.apm.agent.tracer.pooling.Allocator;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import org.jctools.queues.atomic.MpmcAtomicArrayQueue;
@@ -32,12 +33,12 @@
import java.nio.CharBuffer;
import java.util.Enumeration;
-import static co.elastic.apm.agent.impl.context.AbstractContext.REDACTED_CONTEXT_STRING;
+import static co.elastic.apm.agent.impl.context.AbstractContextImpl.REDACTED_CONTEXT_STRING;
-public class Request implements Recyclable, co.elastic.apm.agent.tracer.metadata.Request {
+public class RequestImpl implements Recyclable, Request {
- private static final ObjectPool charBufferPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
+ private static final ObservableObjectPool charBufferPool = QueueBasedObjectPool.of(new MpmcAtomicArrayQueue(128), false,
new Allocator() {
@Override
public CharBuffer createInstance() {
@@ -56,12 +57,12 @@ public void recycle(CharBuffer object) {
* Should include any headers sent by the requester. Map will be taken by headers if supplied.
*/
private final PotentiallyMultiValuedMap headers = new PotentiallyMultiValuedMap();
- private final Socket socket = new Socket();
+ private final SocketImpl socket = new SocketImpl();
/**
* A complete Url, with scheme, host and path.
* (Required)
*/
- private final Url url = new Url();
+ private final UrlImpl url = new UrlImpl();
/**
* A parsed key-value object of cookies
*/
@@ -120,13 +121,13 @@ public void redactBody() {
setRawBody(REDACTED_CONTEXT_STRING);
}
- public Request addFormUrlEncodedParameter(String key, String value) {
+ public RequestImpl addFormUrlEncodedParameter(String key, String value) {
this.postParams.add(key, value);
return this;
}
@Override
- public Request addFormUrlEncodedParameters(String key, String[] values) {
+ public RequestImpl addFormUrlEncodedParameters(String key, String[] values) {
this.postParams.set(key, values);
return this;
}
@@ -158,7 +159,7 @@ public CharBuffer getBodyBuffer() {
}
/**
- * Returns the body buffer if it was written to and writing to it was finished through {@link Request#endOfBufferInput()}
+ * Returns the body buffer if it was written to and writing to it was finished through {@link RequestImpl#endOfBufferInput()}
*
* @return body buffer if it was written to and writing was finished; returns {@code null} otherwise.
*/
@@ -176,7 +177,7 @@ public PotentiallyMultiValuedMap getFormUrlEncodedParameters() {
}
@Override
- public Request addHeader(String headerName, @Nullable String headerValue) {
+ public RequestImpl addHeader(String headerName, @Nullable String headerValue) {
if (headerValue != null) {
headers.add(headerName, headerValue);
}
@@ -184,7 +185,7 @@ public Request addHeader(String headerName, @Nullable String headerValue) {
}
@Override
- public Request addHeader(String headerName, @Nullable Enumeration headerValues) {
+ public RequestImpl addHeader(String headerName, @Nullable Enumeration headerValues) {
if (headerValues != null) {
while (headerValues.hasMoreElements()) {
headers.add(headerName, headerValues.nextElement());
@@ -207,7 +208,7 @@ public String getHttpVersion() {
}
@Override
- public Request withHttpVersion(@Nullable String httpVersion) {
+ public RequestImpl withHttpVersion(@Nullable String httpVersion) {
if (httpVersion != null) {
this.httpVersion = getHttpVersion(httpVersion);
}
@@ -238,23 +239,23 @@ public String getMethod() {
}
@Override
- public Request withMethod(@Nullable String method) {
+ public RequestImpl withMethod(@Nullable String method) {
this.method = method;
return this;
}
@Override
- public Socket getSocket() {
+ public SocketImpl getSocket() {
return socket;
}
@Override
- public Url getUrl() {
+ public UrlImpl getUrl() {
return url;
}
@Override
- public Request addCookie(String cookieName, String cookieValue) {
+ public RequestImpl addCookie(String cookieName, String cookieValue) {
cookies.add(cookieName, cookieValue);
return this;
}
@@ -284,7 +285,7 @@ public void resetState() {
rawBody = null;
}
- public void copyFrom(Request other) {
+ public void copyFrom(RequestImpl other) {
this.postParams.copyFrom(other.postParams);
this.headers.copyFrom(other.headers);
this.httpVersion = other.httpVersion;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ResponseImpl.java
similarity index 85%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ResponseImpl.java
index 4a6ef90b99..50f57c7730 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Response.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ResponseImpl.java
@@ -19,12 +19,13 @@
package co.elastic.apm.agent.impl.context;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
+import co.elastic.apm.agent.tracer.metadata.Response;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
import java.util.Collection;
-public class Response implements Recyclable, co.elastic.apm.agent.tracer.metadata.Response {
+public class ResponseImpl implements Recyclable, Response {
/**
* A mapping of HTTP headers of the response object
@@ -48,7 +49,7 @@ public boolean isFinished() {
}
@Override
- public Response withFinished(boolean finished) {
+ public ResponseImpl withFinished(boolean finished) {
this.finished = finished;
return this;
}
@@ -61,7 +62,7 @@ public Response withFinished(boolean finished) {
* @return {@code this}, for fluent method chaining
*/
@Override
- public Response addHeader(String headerName, @Nullable String headerValue) {
+ public ResponseImpl addHeader(String headerName, @Nullable String headerValue) {
if (headerValue != null) {
headers.add(headerName, headerValue);
}
@@ -69,7 +70,7 @@ public Response addHeader(String headerName, @Nullable String headerValue) {
}
@Override
- public Response addHeader(String headerName, @Nullable Collection headerValues) {
+ public ResponseImpl addHeader(String headerName, @Nullable Collection headerValues) {
if (headerValues != null) {
for (String headerValue : headerValues) {
headers.add(headerName, headerValue);
@@ -89,7 +90,7 @@ public boolean isHeadersSent() {
}
@Override
- public Response withHeadersSent(boolean headersSent) {
+ public ResponseImpl withHeadersSent(boolean headersSent) {
this.headersSent = headersSent;
return this;
}
@@ -102,7 +103,7 @@ public int getStatusCode() {
}
@Override
- public Response withStatusCode(int statusCode) {
+ public ResponseImpl withStatusCode(int statusCode) {
this.statusCode = statusCode;
return this;
}
@@ -115,7 +116,7 @@ public void resetState() {
statusCode = 0;
}
- public void copyFrom(Response other) {
+ public void copyFrom(ResponseImpl other) {
this.finished = other.finished;
this.headers.copyFrom(other.headers);
this.headersSent = other.headersSent;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SanitizingWebProcessor.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SanitizingWebProcessor.java
index 45f30d5ab1..4c79fddb99 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SanitizingWebProcessor.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SanitizingWebProcessor.java
@@ -18,43 +18,43 @@
*/
package co.elastic.apm.agent.impl.context;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
-import co.elastic.apm.agent.impl.error.ErrorCapture;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.impl.error.ErrorCaptureImpl;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
import co.elastic.apm.agent.common.util.WildcardMatcher;
import co.elastic.apm.agent.report.processor.Processor;
import co.elastic.apm.agent.tracer.metadata.PotentiallyMultiValuedMap;
import org.stagemonitor.configuration.ConfigurationRegistry;
-import static co.elastic.apm.agent.impl.context.AbstractContext.REDACTED_CONTEXT_STRING;
+import static co.elastic.apm.agent.impl.context.AbstractContextImpl.REDACTED_CONTEXT_STRING;
/**
- * Sanitizes web-related fields according to the {@link CoreConfiguration#sanitizeFieldNames} setting
+ * Sanitizes web-related fields according to the {@link CoreConfigurationImpl#sanitizeFieldNames} setting
*/
public class SanitizingWebProcessor implements Processor {
- private final CoreConfiguration config;
+ private final CoreConfigurationImpl config;
public SanitizingWebProcessor(ConfigurationRegistry configurationRegistry) {
- config = configurationRegistry.getConfig(CoreConfiguration.class);
+ config = configurationRegistry.getConfig(CoreConfigurationImpl.class);
}
@Override
- public void processBeforeReport(Transaction transaction) {
+ public void processBeforeReport(TransactionImpl transaction) {
sanitizeContext(transaction.getContext());
}
@Override
- public void processBeforeReport(ErrorCapture error) {
+ public void processBeforeReport(ErrorCaptureImpl error) {
sanitizeContext(error.getContext());
}
- private void sanitizeContext(TransactionContext context) {
+ private void sanitizeContext(TransactionContextImpl context) {
sanitizeRequest(context.getRequest());
sanitizeMap(context.getResponse().getHeaders());
}
- private void sanitizeRequest(Request request) {
+ private void sanitizeRequest(RequestImpl request) {
sanitizeMap(request.getHeaders());
// cookies are stored in Request.cookies
// storing it twice would be wasteful
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOriginImpl.java
similarity index 83%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOriginImpl.java
index 5cdf69b407..a5d65ae213 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOrigin.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceOriginImpl.java
@@ -18,6 +18,7 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.ServiceOrigin;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
@@ -28,7 +29,7 @@
* If a request originated from another service,
* the service origin interface can be used to collect information about the origin service.
*/
-public class ServiceOrigin implements co.elastic.apm.agent.tracer.ServiceOrigin, Recyclable {
+public class ServiceOriginImpl implements ServiceOrigin, Recyclable {
@Nullable
private String id;
@@ -44,7 +45,7 @@ public String getId() {
}
@Override
- public ServiceOrigin withId(@Nullable String id) {
+ public ServiceOriginImpl withId(@Nullable String id) {
this.id = id;
return this;
}
@@ -54,7 +55,7 @@ public StringBuilder getName() {
}
@Override
- public ServiceOrigin withName(@Nullable CharSequence name) {
+ public ServiceOriginImpl withName(@Nullable CharSequence name) {
this.name.setLength(0);
if (name != null) {
this.name.append(name);
@@ -62,7 +63,7 @@ public ServiceOrigin withName(@Nullable CharSequence name) {
return this;
}
- public ServiceOrigin appendToName(@Nullable String namePart) {
+ public ServiceOriginImpl appendToName(@Nullable String namePart) {
if (namePart != null) {
this.name.append(namePart);
}
@@ -75,7 +76,7 @@ public String getVersion() {
}
@Override
- public ServiceOrigin withVersion(@Nullable String version) {
+ public ServiceOriginImpl withVersion(@Nullable String version) {
this.version = version;
return this;
}
@@ -93,7 +94,7 @@ public boolean hasContent() {
version != null;
}
- public void copyFrom(ServiceOrigin other) {
+ public void copyFrom(ServiceOriginImpl other) {
id = other.id;
withName(other.getName());
version = other.version;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTarget.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTargetImpl.java
similarity index 87%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTarget.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTargetImpl.java
index 26433233a6..ba4eaefd1b 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTarget.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/ServiceTargetImpl.java
@@ -18,11 +18,12 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.ServiceTarget;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
-public class ServiceTarget implements Recyclable, co.elastic.apm.agent.tracer.ServiceTarget {
+public class ServiceTargetImpl implements Recyclable, ServiceTarget {
@Nullable
private String type;
@@ -36,12 +37,12 @@ public class ServiceTarget implements Recyclable, co.elastic.apm.agent.tracer.Se
private final StringBuilder destinationResource;
- public ServiceTarget() {
+ public ServiceTargetImpl() {
this.name = new StringBuilder();
this.destinationResource = new StringBuilder();
}
- public ServiceTarget withType(@Nullable String type) {
+ public ServiceTargetImpl withType(@Nullable String type) {
if (typeSetByUser) {
return this;
}
@@ -49,7 +50,7 @@ public ServiceTarget withType(@Nullable String type) {
return this;
}
- public ServiceTarget withUserType(@Nullable String type) {
+ public ServiceTargetImpl withUserType(@Nullable String type) {
this.type = type;
this.typeSetByUser = true;
return this;
@@ -60,7 +61,7 @@ public String getType() {
return type;
}
- public ServiceTarget withName(@Nullable CharSequence name) {
+ public ServiceTargetImpl withName(@Nullable CharSequence name) {
if (name == null || name.length() == 0 || nameSetByUser) {
return this;
}
@@ -70,7 +71,7 @@ public ServiceTarget withName(@Nullable CharSequence name) {
return this;
}
- public ServiceTarget withUserName(@Nullable CharSequence name) {
+ public ServiceTargetImpl withUserName(@Nullable CharSequence name) {
this.name.setLength(0);
if (name != null) {
this.name.append(name);
@@ -89,7 +90,7 @@ public CharSequence getName() {
*
* @return this
*/
- public ServiceTarget withNameOnlyDestinationResource() {
+ public ServiceTargetImpl withNameOnlyDestinationResource() {
onlyNameInResource = true;
return this;
}
@@ -101,7 +102,7 @@ public ServiceTarget withNameOnlyDestinationResource() {
* @param port network port
* @return this
*/
- public ServiceTarget withHostPortName(@Nullable CharSequence host, int port) {
+ public ServiceTargetImpl withHostPortName(@Nullable CharSequence host, int port) {
if (host == null || host.length() == 0 || nameSetByUser) {
return this;
}
@@ -162,7 +163,7 @@ public boolean isSetByUser() {
return typeSetByUser || nameSetByUser;
}
- public void copyFrom(ServiceTarget other) {
+ public void copyFrom(ServiceTargetImpl other) {
this.withType(other.type);
this.withName(other.name);
this.typeSetByUser = other.typeSetByUser;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Socket.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SocketImpl.java
similarity index 85%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Socket.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SocketImpl.java
index 4340dd5e4b..b567526a74 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Socket.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SocketImpl.java
@@ -18,11 +18,12 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.Socket;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
-public class Socket implements Recyclable, co.elastic.apm.agent.tracer.metadata.Socket {
+public class SocketImpl implements Recyclable, Socket {
@Nullable
private String remoteAddress;
@@ -33,7 +34,7 @@ public String getRemoteAddress() {
}
@Override
- public Socket withRemoteAddress(@Nullable String remoteAddress) {
+ public SocketImpl withRemoteAddress(@Nullable String remoteAddress) {
this.remoteAddress = remoteAddress;
return this;
}
@@ -43,7 +44,7 @@ public void resetState() {
remoteAddress = null;
}
- public void copyFrom(Socket other) {
+ public void copyFrom(SocketImpl other) {
this.remoteAddress = other.remoteAddress;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContextImpl.java
similarity index 77%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContext.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContextImpl.java
index f5245d642c..aaf03038c2 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/SpanContextImpl.java
@@ -19,48 +19,50 @@
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.SpanContext;
+
/**
* Any other arbitrary data captured by the agent, optionally provided by the user
*/
-public class SpanContext extends AbstractContext implements co.elastic.apm.agent.tracer.SpanContext {
+public class SpanContextImpl extends AbstractContextImpl implements SpanContext {
/**
* An object containing contextual data for database spans
*/
- private final Db db = new Db();
+ private final DbImpl db = new DbImpl();
/**
* An object containing contextual data for outgoing HTTP spans
*/
- private final Http http = new Http();
+ private final HttpImpl http = new HttpImpl();
/**
* An object containing contextual data for service maps
*/
- private final Destination destination = new Destination();
+ private final DestinationImpl destination = new DestinationImpl();
/**
* An object containing contextual data for service target
*/
- private final ServiceTarget serviceTarget = new ServiceTarget();
+ private final ServiceTargetImpl serviceTarget = new ServiceTargetImpl();
@Override
- public Db getDb() {
+ public DbImpl getDb() {
return db;
}
@Override
- public Http getHttp() {
+ public HttpImpl getHttp() {
return http;
}
@Override
- public Destination getDestination() {
+ public DestinationImpl getDestination() {
return destination;
}
@Override
- public ServiceTarget getServiceTarget() {
+ public ServiceTargetImpl getServiceTarget() {
return serviceTarget;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContextImpl.java
similarity index 81%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContextImpl.java
index 05df0e1015..523b70195f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/TransactionContextImpl.java
@@ -18,6 +18,8 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.TransactionContext;
+
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -28,7 +30,7 @@
*
* Any arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user
*/
-public class TransactionContext extends AbstractContext implements co.elastic.apm.agent.tracer.TransactionContext {
+public class TransactionContextImpl extends AbstractContextImpl implements TransactionContext {
/**
* A flat mapping of user-defined {@link String} keys and {@link String}, {@link Number} or {@link Boolean} values
@@ -37,35 +39,35 @@ public class TransactionContext extends AbstractContext implements co.elastic.ap
*
*/
private final Map custom = new ConcurrentHashMap<>();
- private final Response response = new Response();
+ private final ResponseImpl response = new ResponseImpl();
/**
* Request
*
* If a log record was generated as a result of a http request, the http interface can be used to collect this information.
*/
- private final Request request = new Request();
+ private final RequestImpl request = new RequestImpl();
/**
* User
*
* Describes the authenticated User for a request.
*/
- private final User user = new User();
+ private final UserImpl user = new UserImpl();
/**
* CloudOrigin
*
* Describes the cloud information about the origin of a request.
*/
- private final CloudOrigin cloudOrigin = new CloudOrigin();
+ private final CloudOriginImpl cloudOrigin = new CloudOriginImpl();
/**
* ServiceOrigin
*
* Describes the service information about the origin of a request.
*/
- private final ServiceOrigin serviceOrigin = new ServiceOrigin();
+ private final ServiceOriginImpl serviceOrigin = new ServiceOriginImpl();
- public void copyFrom(TransactionContext other) {
+ public void copyFrom(TransactionContextImpl other) {
super.copyFrom(other);
response.copyFrom(other.response);
request.copyFrom(other.request);
@@ -79,7 +81,7 @@ public Object getCustom(String key) {
}
@Override
- public Response getResponse() {
+ public ResponseImpl getResponse() {
return response;
}
@@ -104,22 +106,22 @@ public boolean hasCustom() {
}
@Override
- public Request getRequest() {
+ public RequestImpl getRequest() {
return request;
}
@Override
- public User getUser() {
+ public UserImpl getUser() {
return user;
}
@Override
- public CloudOrigin getCloudOrigin() {
+ public CloudOriginImpl getCloudOrigin() {
return cloudOrigin;
}
@Override
- public ServiceOrigin getServiceOrigin() {
+ public ServiceOriginImpl getServiceOrigin() {
return serviceOrigin;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Url.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UrlImpl.java
similarity index 94%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Url.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UrlImpl.java
index bd94242d25..915e6250e2 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/Url.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UrlImpl.java
@@ -18,6 +18,7 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.Url;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
@@ -27,7 +28,7 @@
import java.net.URL;
-public class Url implements Recyclable, co.elastic.apm.agent.tracer.metadata.Url {
+public class UrlImpl implements Recyclable, Url {
/**
* The full, possibly agent-assembled URL of the request, e.g https://example.com:443/search?q=elasticsearch#top.
@@ -67,7 +68,7 @@ public String getProtocol() {
}
@Override
- public Url withProtocol(@Nullable String protocol) {
+ public UrlImpl withProtocol(@Nullable String protocol) {
this.protocol = protocol;
return this;
}
@@ -112,7 +113,7 @@ private void updateFull() {
* @param value full URL
* @return this
*/
- public Url withFull(CharSequence value) {
+ public UrlImpl withFull(CharSequence value) {
if (!urlNeedsSanitization(value)) {
full.setLength(0);
full.append(value);
@@ -150,7 +151,7 @@ public String getHostname() {
}
@Override
- public Url withHostname(@Nullable String hostname) {
+ public UrlImpl withHostname(@Nullable String hostname) {
this.hostname = hostname;
return this;
}
@@ -163,7 +164,7 @@ public int getPort() {
}
@Override
- public Url withPort(int port) {
+ public UrlImpl withPort(int port) {
this.port = port;
return this;
}
@@ -177,7 +178,7 @@ public String getPathname() {
}
@Override
- public Url withPathname(@Nullable String pathname) {
+ public UrlImpl withPathname(@Nullable String pathname) {
this.pathname = pathname;
return this;
}
@@ -191,7 +192,7 @@ public String getSearch() {
}
@Override
- public Url withSearch(@Nullable String search) {
+ public UrlImpl withSearch(@Nullable String search) {
this.search = search;
return this;
}
@@ -285,7 +286,7 @@ public void resetState() {
search = null;
}
- public void copyFrom(Url other) {
+ public void copyFrom(UrlImpl other) {
this.protocol = other.protocol;
this.full.setLength(0);
this.full.append(other.full);
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/User.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UserImpl.java
similarity index 87%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/User.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UserImpl.java
index 00ea8751c7..880af3ed5f 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/User.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/context/UserImpl.java
@@ -18,12 +18,13 @@
*/
package co.elastic.apm.agent.impl.context;
+import co.elastic.apm.agent.tracer.metadata.User;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
-public class User implements Recyclable, co.elastic.apm.agent.tracer.metadata.User {
+public class UserImpl implements Recyclable, User {
/**
* Domain of the logged in user
@@ -59,7 +60,7 @@ public String getDomain() {
/**
* Domain of the logged in user
*/
- public User withDomain(@Nullable String domain) {
+ public UserImpl withDomain(@Nullable String domain) {
this.domain = domain;
return this;
}
@@ -75,7 +76,7 @@ public String getId() {
/**
* Identifier of the logged in user, e.g. the primary key of the user
*/
- public User withId(@Nullable String id) {
+ public UserImpl withId(@Nullable String id) {
this.id = id;
return this;
}
@@ -91,7 +92,7 @@ public String getEmail() {
/**
* Email of the logged in user
*/
- public User withEmail(@Nullable String email) {
+ public UserImpl withEmail(@Nullable String email) {
this.email = email;
return this;
}
@@ -103,7 +104,7 @@ public String getUsername() {
}
@Override
- public User withUsername(@Nullable String username) {
+ public UserImpl withUsername(@Nullable String username) {
this.username = username;
return this;
}
@@ -116,7 +117,7 @@ public void resetState() {
username = null;
}
- public void copyFrom(User other) {
+ public void copyFrom(UserImpl other) {
this.domain = other.domain;
this.email = other.email;
this.id = other.id;
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCapture.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCaptureImpl.java
similarity index 83%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCapture.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCaptureImpl.java
index 5be5431390..065473b389 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCapture.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/error/ErrorCaptureImpl.java
@@ -19,15 +19,15 @@
package co.elastic.apm.agent.impl.error;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.context.TransactionContext;
-import co.elastic.apm.agent.impl.stacktrace.StacktraceConfiguration;
-import co.elastic.apm.agent.impl.transaction.AbstractSpan;
-import co.elastic.apm.agent.impl.transaction.Span;
-import co.elastic.apm.agent.impl.transaction.TraceContext;
-import co.elastic.apm.agent.impl.transaction.Transaction;
-import co.elastic.apm.agent.common.util.WildcardMatcher;
+import co.elastic.apm.agent.impl.context.TransactionContextImpl;
+import co.elastic.apm.agent.impl.stacktrace.StacktraceConfigurationImpl;
+import co.elastic.apm.agent.impl.transaction.AbstractSpanImpl;
+import co.elastic.apm.agent.impl.transaction.SpanImpl;
+import co.elastic.apm.agent.impl.transaction.TraceContextImpl;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.ErrorCapture;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
import javax.annotation.Nullable;
@@ -37,20 +37,20 @@
/**
* Data captured by an agent representing an event occurring in a monitored service
*/
-public class ErrorCapture implements Recyclable, co.elastic.apm.agent.tracer.ErrorCapture {
+public class ErrorCaptureImpl implements Recyclable, ErrorCapture {
- private static final Logger logger = LoggerFactory.getLogger(ErrorCapture.class);
+ private static final Logger logger = LoggerFactory.getLogger(ErrorCaptureImpl.class);
- private static final ThreadLocal activeError = new ThreadLocal<>();
+ private static final ThreadLocal activeError = new ThreadLocal<>();
- private final TraceContext traceContext;
+ private final TraceContextImpl traceContext;
/**
* Context
*
* Any arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user
*/
- private final TransactionContext context = new TransactionContext();
+ private final TransactionContextImpl context = new TransactionContextImpl();
private final ElasticApmTracer tracer;
/**
* Information about the originally thrown error.
@@ -70,9 +70,9 @@ public class ErrorCapture implements Recyclable, co.elastic.apm.agent.tracer.Err
private final StringBuilder culprit = new StringBuilder();
- public ErrorCapture(ElasticApmTracer tracer) {
+ public ErrorCaptureImpl(ElasticApmTracer tracer) {
this.tracer = tracer;
- traceContext = TraceContext.with128BitId(this.tracer);
+ traceContext = TraceContextImpl.with128BitId(this.tracer);
}
/**
@@ -80,7 +80,7 @@ public ErrorCapture(ElasticApmTracer tracer) {
*
* Any arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user
*/
- public TransactionContext getContext() {
+ public TransactionContextImpl getContext() {
return context;
}
@@ -100,7 +100,7 @@ public long getTimestamp() {
return timestamp;
}
- public ErrorCapture withTimestamp(long epochMs) {
+ public ErrorCaptureImpl withTimestamp(long epochMs) {
this.timestamp = epochMs;
return this;
}
@@ -120,12 +120,12 @@ public void recycle() {
}
/**
- * Creates a reference to a {@link TraceContext}
+ * Creates a reference to a {@link TraceContextImpl}
*
* @param parent parent trace context
* @return {@code this}, for chaining
*/
- public ErrorCapture asChildOf(AbstractSpan> parent) {
+ public ErrorCaptureImpl asChildOf(AbstractSpanImpl> parent) {
this.traceContext.asChildOf(parent.getTraceContext());
if (traceContext.getTraceId().isEmpty()) {
logger.debug("Creating an Error as child of {} with a null trace_id", parent.getNameAsString());
@@ -133,13 +133,13 @@ public ErrorCapture asChildOf(AbstractSpan> parent) {
logger.trace("Stack trace related to Error capture: ", new Throwable());
}
}
- if (parent instanceof Transaction) {
- Transaction transaction = (Transaction) parent;
+ if (parent instanceof TransactionImpl) {
+ TransactionImpl transaction = (TransactionImpl) parent;
// The error might have occurred in a different thread than the one the transaction was recorded
// That's why we have to ensure the visibility of the transaction properties
context.copyFrom(transaction.getContextEnsureVisibility());
- } else if (parent instanceof Span) {
- Span span = (Span) parent;
+ } else if (parent instanceof SpanImpl) {
+ SpanImpl span = (SpanImpl) parent;
// TODO copy into SpanContext
// https://github.com/elastic/apm-agent-java/issues/279
context.copyFrom(span.getContext());
@@ -148,7 +148,7 @@ public ErrorCapture asChildOf(AbstractSpan> parent) {
}
@Override
- public TraceContext getTraceContext() {
+ public TraceContextImpl getTraceContext() {
return traceContext;
}
@@ -158,7 +158,7 @@ public void setException(Throwable e) {
public StringBuilder getCulprit() {
// lazily resolve culprit so that java.lang.Throwable.getStackTrace is called outside the application thread
- final Collection applicationPackages = tracer.getConfig(StacktraceConfiguration.class).getApplicationPackages();
+ final Collection applicationPackages = tracer.getConfig(StacktraceConfigurationImpl.class).getApplicationPackages();
if (exception != null && culprit.length() == 0 && !applicationPackages.isEmpty()) {
computeCulprit(exception, applicationPackages);
}
@@ -201,19 +201,19 @@ private void setCulprit(StackTraceElement stackTraceElement) {
}
@Override
- public ErrorCapture activate() {
+ public ErrorCaptureImpl activate() {
activeError.set(this);
return this;
}
@Override
- public ErrorCapture deactivate() {
+ public ErrorCaptureImpl deactivate() {
activeError.remove();
return this;
}
@Nullable
- public static ErrorCapture getActive() {
+ public static ErrorCaptureImpl getActive() {
return activeError.get();
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/CloudMetadataProvider.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/CloudMetadataProvider.java
index caa060f0b7..6c27226bcf 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/CloudMetadataProvider.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/CloudMetadataProvider.java
@@ -18,8 +18,8 @@
*/
package co.elastic.apm.agent.impl.metadata;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
-import co.elastic.apm.agent.configuration.ServerlessConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.configuration.ServerlessConfigurationImpl;
import co.elastic.apm.agent.util.ExecutorUtils;
import co.elastic.apm.agent.sdk.internal.util.PrivilegedActionUtils;
import co.elastic.apm.agent.util.UrlConnectionUtils;
@@ -44,10 +44,10 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import static co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider.AWS;
-import static co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider.AZURE;
-import static co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider.GCP;
-import static co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider.NONE;
+import static co.elastic.apm.agent.configuration.CoreConfigurationImpl.CloudProvider.AWS;
+import static co.elastic.apm.agent.configuration.CoreConfigurationImpl.CloudProvider.AZURE;
+import static co.elastic.apm.agent.configuration.CoreConfigurationImpl.CloudProvider.GCP;
+import static co.elastic.apm.agent.configuration.CoreConfigurationImpl.CloudProvider.NONE;
import static java.nio.charset.StandardCharsets.UTF_8;
public class CloudMetadataProvider {
@@ -56,16 +56,16 @@ public class CloudMetadataProvider {
private static final DslJson dslJson = new DslJson<>(new DslJson.Settings<>());
/**
- * This method may block on multiple HTTP calls. See {@link #fetchAndParseCloudProviderInfo(CoreConfiguration.CloudProvider, int)}
+ * This method may block on multiple HTTP calls. See {@link #fetchAndParseCloudProviderInfo(CoreConfigurationImpl.CloudProvider, int)}
* for details.
* @param cloudProvider the configured cloud provided - used as an optimization to lookup specific APIs instead of trial-and-error
* @param queryTimeoutMs a configured limitation for the maximum duration of each metadata discovery task
* @return cloud provide metadata, or {@code null} if requested not to do any lookup by using
- * {@link co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider#NONE}
+ * {@link CoreConfigurationImpl.CloudProvider#NONE}
*/
@Nullable
- static CloudProviderInfo getCloudInfoProvider(final CoreConfiguration.CloudProvider cloudProvider, final int queryTimeoutMs,
- ServerlessConfiguration serverlessConfiguration) {
+ static CloudProviderInfo getCloudInfoProvider(final CoreConfigurationImpl.CloudProvider cloudProvider, final int queryTimeoutMs,
+ ServerlessConfigurationImpl serverlessConfiguration) {
if (serverlessConfiguration.runsOnAwsLambda()) {
CloudProviderInfo awsLambdaInfo = new CloudProviderInfo("aws");
@@ -84,18 +84,18 @@ static CloudProviderInfo getCloudInfoProvider(final CoreConfiguration.CloudProvi
/**
* Automatic discovery of cloud provider and related metadata. This method is fetching data from public APIs
* exposed by known cloud provider services through HTTP.
- * When a specific {@link co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider} is specified, only
+ * When a specific {@link CoreConfigurationImpl.CloudProvider} is specified, only
* the relevant API will be queried.
- * However, when called with {@link co.elastic.apm.agent.configuration.CoreConfiguration.CloudProvider#AUTO}, all
+ * However, when called with {@link CoreConfigurationImpl.CloudProvider#AUTO}, all
* known endpoints are queried concurrently. In such cases, blocking is expected to be long, bounded by the
* HTTP requests timing out.
*
- * @param cloudProvider the expected {@link CoreConfiguration.CloudProvider}
+ * @param cloudProvider the expected {@link CoreConfigurationImpl.CloudProvider}
* @param queryTimeoutMs timeout in milliseconds to limit the discovery duration
* @return Automatically discovered {@link CloudProviderInfo}, or {@code null} if none found.
*/
@Nullable
- static CloudProviderInfo fetchAndParseCloudProviderInfo(final CoreConfiguration.CloudProvider cloudProvider, final int queryTimeoutMs) {
+ static CloudProviderInfo fetchAndParseCloudProviderInfo(final CoreConfigurationImpl.CloudProvider cloudProvider, final int queryTimeoutMs) {
Throwable unexpectedError = null;
CloudProviderInfo cloudProviderInfo = null;
@@ -137,7 +137,7 @@ static CloudProviderInfo fetchAndParseCloudProviderInfo(final CoreConfiguration.
}
@Nullable
- private static CloudProviderInfo tryAllCloudProviders(final CoreConfiguration.CloudProvider cloudProvider, final int queryTimeoutMs)
+ private static CloudProviderInfo tryAllCloudProviders(final CoreConfigurationImpl.CloudProvider cloudProvider, final int queryTimeoutMs)
throws InterruptedException, ExecutionException, TimeoutException {
ExecutorService executor = ExecutorUtils.createThreadDaemonPool("cloud-metadata", 2, 2);
@@ -192,7 +192,7 @@ public CloudProviderInfo call() {
return cloudProviderInfo;
}
- private static void logSummary(CoreConfiguration.CloudProvider cloudProvider,
+ private static void logSummary(CoreConfigurationImpl.CloudProvider cloudProvider,
@Nullable CloudProviderInfo cloudProviderInfo, @Nullable Throwable unexpectedError) {
if (cloudProviderInfo == null) {
if (cloudProvider == AWS || cloudProvider == AZURE || cloudProvider == GCP) {
@@ -213,7 +213,7 @@ private static void logSummary(CoreConfiguration.CloudProvider cloudProvider,
}
@Nullable
- private static CloudProviderInfo getAwsMetadata(int queryTimeoutMs, CoreConfiguration.CloudProvider configuredProvider) throws IOException {
+ private static CloudProviderInfo getAwsMetadata(int queryTimeoutMs, CoreConfigurationImpl.CloudProvider configuredProvider) throws IOException {
String awsTokenUrl = "http://169.254.169.254/latest/api/token";
Map headers = new HashMap<>(1);
headers.put("X-aws-ec2-metadata-token-ttl-seconds", "300");
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/MetaData.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/MetaData.java
index 147c9b418d..39e3fc46ec 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/MetaData.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/MetaData.java
@@ -18,9 +18,9 @@
*/
package co.elastic.apm.agent.impl.metadata;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
-import co.elastic.apm.agent.configuration.ServerlessConfiguration;
-import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.configuration.ServerlessConfigurationImpl;
+import co.elastic.apm.agent.report.ReporterConfigurationImpl;
import co.elastic.apm.agent.util.CompletableFuture;
import co.elastic.apm.agent.util.ExecutorUtils;
import org.stagemonitor.configuration.ConfigurationRegistry;
@@ -39,7 +39,7 @@ public class MetaData {
* Service
* (Required)
*/
- private final Service service;
+ private final ServiceImpl service;
/**
* Process
*/
@@ -58,7 +58,7 @@ public class MetaData {
private final ArrayList globalLabelKeys;
private final ArrayList globalLabelValues;
- MetaData(ProcessInfo process, Service service, SystemInfo system, @Nullable CloudProviderInfo cloudProviderInfo,
+ MetaData(ProcessInfo process, ServiceImpl service, SystemInfo system, @Nullable CloudProviderInfo cloudProviderInfo,
Map globalLabels, @Nullable FaaSMetaDataExtension faasMetaDataExtension) {
this.process = process;
this.service = service;
@@ -86,8 +86,8 @@ public class MetaData {
* Creates a metadata to be used with all events sent by the agent.
*
* NOTE: This method is blocking, possibly for several seconds, on outgoing HTTP requests, fetching for cloud
- * metadata, unless the {@link CoreConfiguration#getCloudProvider() cloud_provider} config option is set to
- * {@link CoreConfiguration.CloudProvider#NONE NONE}.
+ * metadata, unless the {@link CoreConfigurationImpl#getCloudProvider() cloud_provider} config option is set to
+ * {@link CoreConfigurationImpl.CloudProvider#NONE NONE}.
*
*
* @param configurationRegistry agent config
@@ -99,13 +99,13 @@ public static MetaDataFuture create(ConfigurationRegistry configurationRegistry,
ephemeralId = UUID.randomUUID().toString();
}
- final CoreConfiguration coreConfiguration = configurationRegistry.getConfig(CoreConfiguration.class);
+ final CoreConfigurationImpl coreConfiguration = configurationRegistry.getConfig(CoreConfigurationImpl.class);
- final ServerlessConfiguration serverlessConfiguration = configurationRegistry.getConfig(ServerlessConfiguration.class);
+ final ServerlessConfigurationImpl serverlessConfiguration = configurationRegistry.getConfig(ServerlessConfigurationImpl.class);
final ServiceFactory serviceFactory = new ServiceFactory();
- final Service service = serviceFactory.createService(coreConfiguration, ephemeralId, serverlessConfiguration.runsOnAwsLambda());
+ final ServiceImpl service = serviceFactory.createService(coreConfiguration, ephemeralId, serverlessConfiguration.runsOnAwsLambda());
final ProcessInfo processInformation = ProcessFactory.ForCurrentVM.INSTANCE.getProcessInformation();
- if (!configurationRegistry.getConfig(ReporterConfiguration.class).isIncludeProcessArguments()) {
+ if (!configurationRegistry.getConfig(ReporterConfigurationImpl.class).isIncludeProcessArguments()) {
processInformation.getArgv().clear();
}
@@ -163,7 +163,7 @@ public MetaData call() throws Exception {
*
* @return the service name
*/
- public Service getService() {
+ public ServiceImpl getService() {
return service;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Node.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/NodeImpl.java
similarity index 90%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Node.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/NodeImpl.java
index 11717c4e1a..4bdfe4d8cd 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Node.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/NodeImpl.java
@@ -18,12 +18,14 @@
*/
package co.elastic.apm.agent.impl.metadata;
+import co.elastic.apm.agent.tracer.service.Node;
+
import javax.annotation.Nullable;
/**
* A representation of a service node, ie JVM
*/
-public class Node implements co.elastic.apm.agent.tracer.service.Node {
+public class NodeImpl implements Node {
/**
* (Optional)
@@ -32,7 +34,7 @@ public class Node implements co.elastic.apm.agent.tracer.service.Node {
@Nullable
private final String name;
- public Node(@Nullable String name) {
+ public NodeImpl(@Nullable String name) {
this.name = name;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceFactory.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceFactory.java
index 2a75c6b188..77a134b80e 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceFactory.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceFactory.java
@@ -24,15 +24,15 @@
public class ServiceFactory {
- public Service createService(CoreConfiguration coreConfiguration, String ephemeralId, boolean runsOnAwsLambda) {
- Service service = new Service()
+ public ServiceImpl createService(CoreConfiguration coreConfiguration, String ephemeralId, boolean runsOnAwsLambda) {
+ ServiceImpl service = new ServiceImpl()
.withName(coreConfiguration.getServiceName())
.withVersion(coreConfiguration.getServiceVersion())
.withEnvironment(coreConfiguration.getEnvironment())
.withAgent(new Agent("java", VersionUtils.getAgentVersion(), ephemeralId, coreConfiguration))
.withRuntime(new RuntimeInfo("Java", System.getProperty("java.version")))
.withLanguage(new Language("Java", System.getProperty("java.version")))
- .withNode(new Node(coreConfiguration.getServiceNodeName()));
+ .withNode(new NodeImpl(coreConfiguration.getServiceNodeName()));
if (runsOnAwsLambda) {
augmentServiceForAWSLambda(service);
@@ -40,17 +40,17 @@ public Service createService(CoreConfiguration coreConfiguration, String ephemer
return service;
}
- private void augmentServiceForAWSLambda(Service service) {
+ private void augmentServiceForAWSLambda(ServiceImpl service) {
String runtimeName = PrivilegedActionUtils.getEnv("AWS_EXECUTION_ENV");
runtimeName = null != runtimeName ? runtimeName : "AWS_Lambda_java";
service.withRuntime(new RuntimeInfo(runtimeName, System.getProperty("java.version")));
- Node node = service.getNode();
+ NodeImpl node = service.getNode();
String nodeName = (node != null) ? node.getName() : null;
if (nodeName == null || nodeName.isEmpty()) {
String serviceNodeName = PrivilegedActionUtils.getEnv("AWS_LAMBDA_LOG_STREAM_NAME");
if (null != serviceNodeName) {
- service.withNode(new Node(serviceNodeName));
+ service.withNode(new NodeImpl(serviceNodeName));
}
}
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Service.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceImpl.java
similarity index 86%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Service.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceImpl.java
index 6c44db9159..a1ed4d1309 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/Service.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/ServiceImpl.java
@@ -19,13 +19,15 @@
package co.elastic.apm.agent.impl.metadata;
+import co.elastic.apm.agent.tracer.service.Service;
+
import javax.annotation.Nullable;
/**
* Information about the instrumented Service
*/
-public class Service implements co.elastic.apm.agent.tracer.service.Service {
+public class ServiceImpl implements Service {
/**
* Name and version of the Elastic APM agent
@@ -47,7 +49,7 @@ public class Service implements co.elastic.apm.agent.tracer.service.Service {
* Representation of a service node
*/
@Nullable
- private Node node;
+ private NodeImpl node;
/**
* Immutable name of the service emitting this event
* (Required)
@@ -88,7 +90,7 @@ public Agent getAgent() {
* Name and version of the Elastic APM agent
* (Required)
*/
- public Service withAgent(Agent agent) {
+ public ServiceImpl withAgent(Agent agent) {
this.agent = agent;
return this;
}
@@ -106,7 +108,7 @@ public Framework getFramework() {
* Name and version of the Framework
* (Required)
*/
- public Service withFramework(Framework framework) {
+ public ServiceImpl withFramework(Framework framework) {
this.framework = framework;
return this;
}
@@ -122,21 +124,21 @@ public Language getLanguage() {
/**
* Name and version of the programming language used
*/
- public Service withLanguage(Language language) {
+ public ServiceImpl withLanguage(Language language) {
this.language = language;
return this;
}
@Nullable
@Override
- public Node getNode() {
+ public NodeImpl getNode() {
return node;
}
/**
* Representation of a service node
*/
- public Service withNode(Node node) {
+ public ServiceImpl withNode(NodeImpl node) {
this.node = node;
return this;
}
@@ -151,7 +153,7 @@ public String getName() {
* Immutable name of the service emitting this event
* (Required)
*/
- public Service withName(String name) {
+ public ServiceImpl withName(String name) {
this.name = name;
return this;
}
@@ -165,7 +167,7 @@ public String getEnvironment() {
/**
* Environment name of the service, e.g. "production" or "staging"
*/
- public Service withEnvironment(@Nullable String environment) {
+ public ServiceImpl withEnvironment(@Nullable String environment) {
this.environment = environment;
return this;
}
@@ -181,7 +183,7 @@ public RuntimeInfo getRuntime() {
/**
* Name and version of the language runtime running this service
*/
- public Service withRuntime(RuntimeInfo runtime) {
+ public ServiceImpl withRuntime(RuntimeInfo runtime) {
this.runtime = runtime;
return this;
}
@@ -195,7 +197,7 @@ public String getVersion() {
/**
* Version of the service emitting this event
*/
- public Service withVersion(@Nullable String version) {
+ public ServiceImpl withVersion(@Nullable String version) {
this.version = version;
return this;
}
@@ -211,7 +213,7 @@ public String getId() {
/**
* ID of the service emitting this event
*/
- public Service withId(@Nullable String id) {
+ public ServiceImpl withId(@Nullable String id) {
this.id = id;
return this;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
index cb2c0f814a..0d6d386782 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/metadata/SystemInfo.java
@@ -20,7 +20,8 @@
import co.elastic.apm.agent.common.util.ProcessExecutionUtil;
-import co.elastic.apm.agent.configuration.ServerlessConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
+import co.elastic.apm.agent.configuration.ServerlessConfigurationImpl;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
@@ -65,7 +66,7 @@ public class SystemInfo {
private final String architecture;
/**
- * Hostname configured manually through {@link co.elastic.apm.agent.configuration.CoreConfiguration#hostname}.
+ * Hostname configured manually through {@link CoreConfigurationImpl#hostname}.
*/
@SuppressWarnings("JavadocReference")
@Nullable
@@ -112,13 +113,13 @@ public SystemInfo(String architecture, @Nullable String configuredHostname, @Nul
* Creates a {@link SystemInfo} containing auto-discovered info about the system.
* This method may block on reading files and executing external processes.
*
- * @param configuredHostname hostname configured through the {@link co.elastic.apm.agent.configuration.CoreConfiguration#hostname} config
+ * @param configuredHostname hostname configured through the {@link CoreConfigurationImpl#hostname} config
* @param timeoutMillis enables to limit the execution of the system discovery task
* @param serverlessConfiguration serverless config
* @return a future from which this system's info can be obtained
*/
@SuppressWarnings("JavadocReference")
- public static SystemInfo create(final @Nullable String configuredHostname, final long timeoutMillis, ServerlessConfiguration serverlessConfiguration) {
+ public static SystemInfo create(final @Nullable String configuredHostname, final long timeoutMillis, ServerlessConfigurationImpl serverlessConfiguration) {
final String osName = System.getProperty("os.name");
final String osArch = System.getProperty("os.arch");
@@ -459,7 +460,7 @@ public String getHostname() {
}
/**
- * The hostname manually configured through {@link co.elastic.apm.agent.configuration.CoreConfiguration#hostname}
+ * The hostname manually configured through {@link CoreConfigurationImpl#hostname}
*
* @return the manually configured hostname
*/
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ConstantSampler.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ConstantSampler.java
index 4a700880f0..dc4d59d199 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ConstantSampler.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ConstantSampler.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.impl.sampling;
-import co.elastic.apm.agent.impl.transaction.Id;
+import co.elastic.apm.agent.impl.transaction.IdImpl;
import co.elastic.apm.agent.impl.transaction.TraceState;
/**
@@ -49,7 +49,7 @@ public static Sampler of(boolean decision) {
}
@Override
- public boolean isSampled(Id traceId) {
+ public boolean isSampled(IdImpl traceId) {
return decision;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ProbabilitySampler.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ProbabilitySampler.java
index c146defd20..21909403ea 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ProbabilitySampler.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/ProbabilitySampler.java
@@ -18,7 +18,7 @@
*/
package co.elastic.apm.agent.impl.sampling;
-import co.elastic.apm.agent.impl.transaction.Id;
+import co.elastic.apm.agent.impl.transaction.IdImpl;
import co.elastic.apm.agent.impl.transaction.TraceState;
/**
@@ -29,9 +29,9 @@
*
* Implementation notes:
*
- * We are taking advantage of the fact, that the {@link Id} is randomly generated.
+ * We are taking advantage of the fact, that the {@link IdImpl} is randomly generated.
* So instead of generating another random number,
- * we just see if the long value returned by {@link Id#getLeastSignificantBits()}
+ * we just see if the long value returned by {@link IdImpl#getLeastSignificantBits()}
* falls into the range between the {@code lowerBound} and the higherBound
.
* This is a visual representation of the mechanism with a sampling rate of 0.5 (=50%):
*
@@ -70,7 +70,7 @@ public static Sampler of(double samplingRate) {
}
@Override
- public boolean isSampled(Id traceId) {
+ public boolean isSampled(IdImpl traceId) {
final long leastSignificantBits = traceId.getLeastSignificantBits();
return leastSignificantBits > lowerBound && leastSignificantBits < higherBound;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/Sampler.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/Sampler.java
index 53a48f1b57..65e2bc2adb 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/Sampler.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/sampling/Sampler.java
@@ -18,22 +18,22 @@
*/
package co.elastic.apm.agent.impl.sampling;
-import co.elastic.apm.agent.impl.transaction.Id;
-import co.elastic.apm.agent.impl.transaction.Span;
-import co.elastic.apm.agent.impl.transaction.Transaction;
+import co.elastic.apm.agent.impl.transaction.IdImpl;
+import co.elastic.apm.agent.impl.transaction.SpanImpl;
+import co.elastic.apm.agent.impl.transaction.TransactionImpl;
/**
- * A sampler is responsible for determining whether a {@link Transaction} should be sampled.
+ * A sampler is responsible for determining whether a {@link TransactionImpl} should be sampled.
*
* In contrast other tracing systems,
* in Elastic APM,
- * non-sampled {@link Transaction}s do get reported to the APM server.
+ * non-sampled {@link TransactionImpl}s do get reported to the APM server.
* However,
* to keep the size at a minimum,
- * the reported {@link Transaction} only contains the transaction name,
+ * the reported {@link TransactionImpl} only contains the transaction name,
* the duration and the id.
* Also,
- * {@link Span}s of non sampled {@link Transaction}s are not reported.
+ * {@link SpanImpl}s of non sampled {@link TransactionImpl}s are not reported.
*
*/
public interface Sampler {
@@ -44,7 +44,7 @@ public interface Sampler {
* @param traceId The id of the transaction.
* @return The sampling decision.
*/
- boolean isSampled(Id traceId);
+ boolean isSampled(IdImpl traceId);
/**
* @return current sample rate
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfigurationImpl.java
similarity index 97%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfiguration.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfigurationImpl.java
index 69db9c4dc6..c71ac3c97e 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfiguration.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/stacktrace/StacktraceConfigurationImpl.java
@@ -18,6 +18,7 @@
*/
package co.elastic.apm.agent.impl.stacktrace;
+import co.elastic.apm.agent.tracer.configuration.StacktraceConfiguration;
import co.elastic.apm.agent.tracer.configuration.TimeDuration;
import co.elastic.apm.agent.tracer.configuration.TimeDurationValueConverter;
import org.stagemonitor.configuration.ConfigurationOption;
@@ -26,7 +27,7 @@
import java.util.Collection;
import java.util.Collections;
-public class StacktraceConfiguration extends ConfigurationOptionProvider implements co.elastic.apm.agent.tracer.configuration.StacktraceConfiguration {
+public class StacktraceConfigurationImpl extends ConfigurationOptionProvider implements StacktraceConfiguration {
private static final String STACKTRACE_CATEGORY = "Stacktrace";
public static final String APPLICATION_PACKAGES = "application_packages";
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractRefCountedContext.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractRefCountedContext.java
index 9183f4d37c..fd4cc9d7cf 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractRefCountedContext.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractRefCountedContext.java
@@ -25,7 +25,7 @@
import java.util.concurrent.atomic.AtomicInteger;
-public abstract class AbstractRefCountedContext> extends ElasticContext implements Recyclable {
+public abstract class AbstractRefCountedContext> extends TraceStateImpl implements Recyclable {
private static final Logger logger = LoggerFactory.getLogger(AbstractRefCountedContext.class);
private final AtomicInteger references = new AtomicInteger();
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpanImpl.java
similarity index 90%
rename from apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java
rename to apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpanImpl.java
index acff311f89..d9e1c57c97 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpan.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpanImpl.java
@@ -19,15 +19,16 @@
package co.elastic.apm.agent.impl.transaction;
import co.elastic.apm.agent.common.util.WildcardMatcher;
-import co.elastic.apm.agent.configuration.CoreConfiguration;
+import co.elastic.apm.agent.configuration.CoreConfigurationImpl;
import co.elastic.apm.agent.impl.ElasticApmTracer;
-import co.elastic.apm.agent.impl.baggage.Baggage;
-import co.elastic.apm.agent.impl.context.AbstractContext;
-import co.elastic.apm.agent.report.ReporterConfiguration;
+import co.elastic.apm.agent.impl.baggage.BaggageImpl;
+import co.elastic.apm.agent.impl.context.AbstractContextImpl;
+import co.elastic.apm.agent.report.ReporterConfigurationImpl;
import co.elastic.apm.agent.sdk.internal.collections.LongList;
import co.elastic.apm.agent.sdk.internal.util.LoggerUtils;
import co.elastic.apm.agent.sdk.logging.Logger;
import co.elastic.apm.agent.sdk.logging.LoggerFactory;
+import co.elastic.apm.agent.tracer.AbstractSpan;
import co.elastic.apm.agent.tracer.Outcome;
import co.elastic.apm.agent.tracer.dispatch.HeaderGetter;
import co.elastic.apm.agent.tracer.pooling.Recyclable;
@@ -40,15 +41,15 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
-public abstract class AbstractSpan> extends AbstractRefCountedContext implements Recyclable, co.elastic.apm.agent.tracer.AbstractSpan {
- private static final Logger logger = LoggerFactory.getLogger(AbstractSpan.class);
+public abstract class AbstractSpanImpl> extends AbstractRefCountedContext implements Recyclable, AbstractSpan {
+ private static final Logger logger = LoggerFactory.getLogger(AbstractSpanImpl.class);
private static final Logger oneTimeDuplicatedEndLogger = LoggerUtils.logOnce(logger);
private static final Logger oneTimeMaxSpanLinksLogger = LoggerUtils.logOnce(logger);
protected static final double MS_IN_MICROS = TimeUnit.MILLISECONDS.toMicros(1);
- protected final TraceContext traceContext;
+ protected final TraceContextImpl traceContext;
- protected Baggage baggage = Baggage.EMPTY;
+ protected BaggageImpl baggage = BaggageImpl.EMPTY;
/**
* Generic designation of a transaction in the scope of a single service (eg: 'GET /users/:id')
@@ -71,7 +72,7 @@ public abstract class AbstractSpan> extends AbstractRe
* This use case for child ids is modifying parent/child relationships for profiler-inferred spans.
* Inferred spans are sent after a profiling session ends (5s by default) and after stack traces have been processed into inferred spans.
* Regular spans are sent right after the event (for example a DB call) has occurred.
- * The effect is that a regular span cannot have a {@link TraceContext#parentId} pointing to an inferred span.
+ * The effect is that a regular span cannot have a {@link TraceContextImpl#parentId} pointing to an inferred span.
* That is because the latter did not exist at the time the regular span has been created.
*
*
@@ -113,11 +114,11 @@ public abstract class AbstractSpan> extends AbstractRe
private volatile boolean sync = true;
- protected final SpanAtomicReference bufferedSpan = new SpanAtomicReference<>();
+ protected final SpanAtomicReference bufferedSpan = new SpanAtomicReference<>();
// Span links handling
public static final int MAX_ALLOWED_SPAN_LINKS = 1000;
- private final List spanLinks = new UniqueSpanLinkArrayList();
+ private final List spanLinks = new UniqueSpanLinkArrayList();
@Nullable
private OTelSpanKind otelKind = null;
@@ -190,11 +191,11 @@ public long getDuration() {
}
}
- public AbstractSpan(ElasticApmTracer tracer) {
+ public AbstractSpanImpl(ElasticApmTracer tracer) {
super(tracer);
- traceContext = TraceContext.with64BitId(this.tracer);
- boolean selfTimeCollectionEnabled = !WildcardMatcher.isAnyMatch(tracer.getConfig(ReporterConfiguration.class).getDisableMetrics(), "span.self_time");
- boolean breakdownMetricsEnabled = tracer.getConfig(CoreConfiguration.class).isBreakdownMetricsEnabled();
+ traceContext = TraceContextImpl.with64BitId(this.tracer);
+ boolean selfTimeCollectionEnabled = !WildcardMatcher.isAnyMatch(tracer.getConfig(ReporterConfigurationImpl.class).getDisableMetrics(), "span.self_time");
+ boolean breakdownMetricsEnabled = tracer.getConfig(CoreConfigurationImpl.class).isBreakdownMetricsEnabled();
collectBreakdownMetrics = selfTimeCollectionEnabled && breakdownMetricsEnabled;
}
@@ -215,7 +216,7 @@ public long getSelfDuration() {
}
public double getDurationMs() {
- return getDuration() / AbstractSpan.MS_IN_MICROS;
+ return getDuration() / AbstractSpanImpl.MS_IN_MICROS;
}
/**
@@ -339,7 +340,7 @@ public long getTimestamp() {
}
@Override
- public TraceContext getTraceContext() {
+ public TraceContextImpl getTraceContext() {
return traceContext;
}
@@ -371,7 +372,7 @@ public boolean addSpanLink(
}
boolean added = false;
try {
- TraceContext childTraceContext = tracer.createSpanLink();
+ TraceContextImpl childTraceContext = tracer.createSpanLink();
if (childTraceContext.asChildOf(carrier, headerGetter, false)) {
added = spanLinks.add(childTraceContext);
}
@@ -393,13 +394,13 @@ public boolean addSpanLink(
* @param the parent type - AbstractSpan, TraceContext or Tracer
* @return {@code true} if added, {@code false} otherwise
*/
- public boolean addSpanLink(TraceContext.ChildContextCreator childContextCreator, T parent) {
+ public boolean addSpanLink(TraceContextImpl.ChildContextCreator childContextCreator, T parent) {
if (!canAddSpanLink()) {
return false;
}
boolean added = false;
try {
- TraceContext childTraceContext = tracer.createSpanLink();
+ TraceContextImpl childTraceContext = tracer.createSpanLink();
if (childContextCreator.asChildOf(childTraceContext, parent)) {
added = spanLinks.add(childTraceContext);
}
@@ -413,13 +414,13 @@ public boolean addSpanLink(TraceContext.ChildContextCreator childContextC
}
/**
- * Returns a list of links from this span to other spans in the format of child {@link TraceContext}s, of which parent is the linked
+ * Returns a list of links from this span to other spans in the format of child {@link TraceContextImpl}s, of which parent is the linked
* span. For each entry in the returned list, the linked span's {@code traceId} can be retrieved through
- * {@link TraceContext#getTraceId()} and the {@code spanId} can be retrieved through {@link TraceContext#getParentId()}.
+ * {@link TraceContextImpl#getTraceId()} and the {@code spanId} can be retrieved through {@link TraceContextImpl#getParentId()}.
*
- * @return a list of child {@link TraceContext}s of linked spans
+ * @return a list of child {@link TraceContextImpl}s of linked spans
*/
- public List getSpanLinks() {
+ public List getSpanLinks() {
return spanLinks;
}
@@ -433,7 +434,7 @@ public void resetState() {
timestamp.set(0L);
endTimestamp.set(0L);
traceContext.resetState();
- baggage = Baggage.EMPTY;
+ baggage = BaggageImpl.EMPTY;
childDurations.resetState();
namePriority = PRIORITY_DEFAULT;
discardRequested = false;
@@ -457,19 +458,19 @@ private void recycleSpanLinks() {
}
@Override
- public Span createSpan() {
+ public SpanImpl createSpan() {
return createSpan(getBaggage());
}
- public Span createSpan(long epochMicros) {
+ public SpanImpl createSpan(long epochMicros) {
return createSpan(getBaggage(), epochMicros);
}
- public Span createSpan(Baggage newBaggage) {
+ public SpanImpl createSpan(BaggageImpl newBaggage) {
return createSpan(newBaggage, traceContext.getClock().getEpochMicros());
}
- private Span createSpan(Baggage baggage, long epochMicros) {
+ private SpanImpl createSpan(BaggageImpl baggage, long epochMicros) {
return tracer.startSpan(this, baggage, epochMicros);
}
@@ -528,7 +529,7 @@ public void addLabel(String key, Boolean value) {
}
@Override
- public abstract AbstractContext getContext();
+ public abstract AbstractContextImpl getContext();
/**
* Called after the span has been started and its parent references are set
@@ -539,7 +540,7 @@ protected void onAfterStart() {
// or even after its reported and the last child span is ended
incrementReferences();
- List baggageToAttach = tracer.getConfig(CoreConfiguration.class).getBaggageToAttach();
+ List baggageToAttach = tracer.getConfig(CoreConfigurationImpl.class).getBaggageToAttach();
baggage.storeBaggageInAttributes(this, baggageToAttach);
}
@@ -564,7 +565,7 @@ public final void end(long epochMicros) {
beforeEnd(epochMicros);
this.finished = true;
- Span buffered = bufferedSpan.incrementReferencesAndGet();
+ SpanImpl buffered = bufferedSpan.incrementReferencesAndGet();
if (buffered != null) {
try {
if (bufferedSpan.compareAndSet(buffered, null)) {
@@ -605,11 +606,11 @@ protected boolean hasCapturedExceptions() {
protected abstract void afterEnd();
- public boolean isChildOf(AbstractSpan> parent) {
+ public boolean isChildOf(AbstractSpanImpl> parent) {
return traceContext.isChildOf(parent.traceContext) || parent.hasChildId(traceContext.getId());
}
- private boolean hasChildId(Id spanId) {
+ private boolean hasChildId(IdImpl spanId) {
if (childIds != null) {
return childIds.contains(spanId.readLong(0));
}
@@ -617,7 +618,7 @@ private boolean hasChildId(Id spanId) {
}
@Override
- public Baggage getBaggage() {
+ public BaggageImpl getBaggage() {
return baggage;
}
@@ -627,7 +628,7 @@ public Baggage getBaggage() {
*
* @return the transaction.
*/
- public abstract Transaction getParentTransaction();
+ public abstract TransactionImpl getParentTransaction();
/**
* Set start timestamp
@@ -714,7 +715,7 @@ public T withUserOutcome(Outcome outcome) {
}
@Override
- public AbstractSpan> getSpan() {
+ public AbstractSpanImpl> getSpan() {
return this;
}
diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
index 74bcf45c95..ada478514e 100644
--- a/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
+++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/DroppedSpanStats.java
@@ -18,8 +18,8 @@
*/
package co.elastic.apm.agent.impl.transaction;
-import co.elastic.apm.agent.impl.context.ServiceTarget;
-import co.elastic.apm.agent.objectpool.ObjectPool;
+import co.elastic.apm.agent.impl.context.ServiceTargetImpl;
+import co.elastic.apm.agent.objectpool.ObservableObjectPool;
import co.elastic.apm.agent.objectpool.impl.QueueBasedObjectPool;
import co.elastic.apm.agent.tracer.Outcome;
import co.elastic.apm.agent.util.CharSequenceUtils;
@@ -59,7 +59,7 @@ public StatsKey() {
cachedHashCode = Integer.MIN_VALUE;
}
- public StatsKey init(ServiceTarget serviceTarget, Outcome outcome) {
+ public StatsKey init(ServiceTargetImpl serviceTarget, Outcome outcome) {
resetState();
// we have to use a copy as argument is mutable will be recycled
this.serviceType = Objects.requireNonNull(serviceTarget.getType());
@@ -148,14 +148,14 @@ public void resetState() {
}
}
- private static final ObjectPool statsKeyObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcAtomicArrayQueue(512), false, new Allocator() {
+ private static final ObservableObjectPool statsKeyObjectPool = QueueBasedObjectPool.ofRecyclable(new MpmcAtomicArrayQueue(512), false, new Allocator() {
@Override
public StatsKey createInstance() {
return new StatsKey();
}
});
- private static final ObjectPool