Elastic APM Java Agent breaking changes
Serverless Observability Stack APM Agent Java
Before you upgrade, carefully review the Elastic APM Java Agent breaking changes and take the necessary steps to mitigate any issues.
To learn how to upgrade, check out Upgrading.
Release date: May 27, 2025
- Switched from using a label for HTTP client body storage to using the
http.request.body.orginalspan field. This requires APM-server 8.18+, the old behaviour can be restored via thecapture_http_client_request_body_as_labelconfig option - #1234
Release date: March 05, 2024
- The minimum supported OpenTelemetry version has been increased to 1.4.0 - #3535
Release date: December 07, 2023
- Added support for OpenTelemetry
1.32.0. As a result,custom_metrics_histogram_boundarieswill not work when you bring your ownMeterProviderfrom an SDK with version1.32.0or newer. As a workaround, you should manually register a corresponding View in yourMeterProvider. Note that this change will not affect you, if you are using the OpenTelemetry API only and not the SDK. - #3447
Release date: April 11, 2023
- The list of instrumentation groups for log-related features have been simplified to
logging,log-reformatting,log-correlationandlog-error, as a consequence any agent configuration withenable_instrumentationsordisable_instrumentationsmight require adjustments as the following instrumentation groups no longer exist:jul-ecs,jul-error,log4j1-correlation,log4j1-ecs,log4j1-error,log4j2-correlation,log4j2-ecs,log4j2-error,logback-correlation,logback-ecsandslf4j-error.
Release date: January 27, 2023
- Previously, agent instrumented all implementations of
javax.jms.MessageListener, which could cause performance issues. From now on, the instrumentation is limited to implementations that fit at least one of the following criteria:- have
MessageorListenerin their class name - is an anonymous inner class or a lambda
- is within a package provided by the
jms_listener_packagesconfiguration.
- have
- The
context.destination.service.resourcespan field has been changed for AWS S3, SQS and DynamoDB. As a result, the history of metrics relying on this field might break. - #2947
Release date: July 08, 2022
As of version 1.33.0, Java 7 support is deprecated and will be removed in a future release (not expected to be removed before January 2024) - #2677
Release date: June 13, 2022
- If using the public API of version < 1.32.0 and using the
@CaptureSpanor@Tracedannotations, upgrading the agent to 1.32.0 without upgrading the API version may causeVerifyError. This was fixed in version 1.33.0, which can once again be used with any version of the public API. - For relational databases, the agent now captures the database name and makes it part of service dependencies and service map.
For example, with a
MySQLdatabase, previously a singlemysqlitem was shown in the map and in service dependencies, the agent will now include the database name in the dependency, thusmysql/my-db1,mysql/my-db2will now be captured.
Release date: May 17, 2022
- Starting this version, when using
log_ecs_reformatting, the agent will automatically set theservice.versionfield. If you are using ECS-logging and set theservice.versionthrough a custom field, the behaviour is not strictly defined. Remove the customservice.namefield setting and either allow the agent to automatically discover and set it, or use theservice_versionconfig option to set it manually.
Release date: March 22, 2022
- Create the JDBC spans as exit spans- #2484
- WebSocket requests are now captured with transaction type request instead of custom - #2501
Release date: February 09, 2022
- Changes in service name auto-discovery of jar files (see Features section)
Release date: December 22, 2021
- If the agent cannot discover a service name, it now uses
unknown-java-serviceinstead ofmy-service- #2325
Release date: November 15, 2021
transaction_ignore_urlsnow relies on full request URL path - #2146- On a typical application server like Tomcat, deploying an
app.warapplication to the non-ROOT context makes it accessible withhttp://localhost:8080/app/ - Ignoring the whole webapp through
/app/*was not possible until now. - Existing configuration may need to be updated to include the deployment context, thus for example
/static/*.jsused to exclude known static files in all applications might be changed to/app/static/*.jsor*/static/*.js. - It only impacts prefix patterns due to the additional context path in pattern.
- It does not impact deployment within the
ROOTcontext like Spring-boot which do not have such context path prefix.
- On a typical application server like Tomcat, deploying an
- The metrics
transaction.duration.sum.us,transaction.duration.countandtransaciton.breakdown.countare no longer recorded - #2194 - Automatic hostname discovery mechanism had changed, so the resulted
host.nameandhost.hostnamein events reported by the agent may be different. This was done in order to improve the integration with host metrics in the APM UI.
Release date: September 14, 2021
- If you rely on Database span subtype and use Microsoft SQL Server, the span subtype has been changed from
sqlservertomssqlto align with other agents. - Stop collecting the field
http.request.socket.encryptedin http requests - #2136
Release date: July 22, 2021
- If you rely on instrumentations that are in the
experimentalgroup, you must now setenable_experimental_instrumentations=trueotherwise the experimental instrumentations will be disabled by default. Up to version1.24.0using an empty value fordisable_instrumentationswas the recommended way to override the defaultdisable_instrumentations=experimental.
Release date: April 22, 2021
- There are breaking changes in the attacher cli. See the Features section for more information.
Release date: March 24, 2021
- Dots in metric names of Micrometer metrics get replaced with underscores to avoid mapping conflicts.
De-dotting be disabled via
dedot_custom_metrics. - #1700
Release date: February 09, 2021
- Following PR #1650, there are two slight changes with the
server_urlandserver_urlsconfiguration options:- So far, setting
server_urlswith an empty string would allow the agent to work normally, apart from any action that requires communication with the APM Server, including the attempt to fetch a central configuration. Starting in this agent version, settingserver_urlsto empty string doesn't have any special meaning, it is the default expected configuration, whereserver_urlwill be used instead. In order to achieve the same behaviour, use the newdisable_sendconfiguration. - Up to this version,
server_urlwas used as an alias toserver_urls, meaning that one could potentially set theserver_urlconfig with a comma-separated list of multiple APM Server addresses, and that would have been a valid configuration. Starting in this agent version,server_urlis a separate configuration, and it only accepts Strings that represent a single valid URL. Specifically, empty strings and commas are invalid.
- So far, setting
Release date: January 07, 2021
- The following public API types were
publicso far and became package-private:NoopScope,ScopeImplandAbstractSpanImpl. If your code is using them, you will need to change that when upgrading to this version. Related PR: #1532
Release date: July 22, 2020
- Early Java 7 versions, prior to update 60, are not supported anymore. When trying to attach to a non-supported version, the agent will disable itself and not apply any instrumentations.
Release date: March 27, 2020
- Ordering of configuration sources has slightly changed, please review Configuration:
elasticapm.propertiesfile now has higher priority over java system properties and environment variables, + This change allows to change dynamic options values at runtime by editing file, previously values set in java properties or environment variables could not be overridden, even if they were dynamic.
- Renamed some configuration options related to the experimental profiler-inferred spans feature (#1084):
profiling_spans_enabled->profiling_inferred_spans_enabledprofiling_sampling_interval->profiling_inferred_spans_sampling_intervalprofiling_spans_min_duration->profiling_inferred_spans_min_durationprofiling_included_classes->profiling_inferred_spans_included_classesprofiling_excluded_classes->profiling_inferred_spans_excluded_classes- Removed
profiling_intervalandprofiling_duration(both are fixed to 5s now)
Release date: August 22, 2019
- The
apm-agent-attach.jaris not executable anymore. Useapm-agent-attach-standalone.jarinstead.
Release date: July 30, 2019
- The log correlation feature does not add
span.idto the MDC anymore but onlytrace.idandtransaction.id#742.
Release date: March 26, 2019
- If you didn't explicitly set the
service_namepreviously and you are dealing with a servlet-based application (including Spring Boot), yourservice_namewill change. See the documentation forservice_nameand the corresponding section in Features for more information. Note: this requires APM Server 7.0+. If using previous versions, nothing will change.
Release date: November 14, 2018
- Remove intake v1 support. This version requires APM Server 6.5.0+ which supports the intake api v2.
Until the time the APM Server 6.5.0 is officially released,
you can test with docker by pulling the APM Server image via
docker pull docker.elastic.co/apm/apm-server:6.5.0-SNAPSHOT.
Release date: November 06, 2018
- Remove intake v1 support. This version requires APM Server 6.5.0+ which supports the intake api v2.
Until the time the APM Server 6.5.0 is officially released,
you can test with docker by pulling the APM Server image via
docker pull docker.elastic.co/apm/apm-server:6.5.0-SNAPSHOT. - Wildcard patterns are case insensitive by default. Prepend
(?-i)to make the matching case sensitive.