Releases: elastic/apm-agent-java
Releases · elastic/apm-agent-java
Release 1.12.0
1.12.0
Features
- JMS Enhancements (#911):
- Add special handling for temporary queues/topics
- Capture message bodies of text Messages
- Rely on the existing
ELASTIC_APM_CAPTURE_BODYagent config option (off by default). - Send as
context.message.body - Limit size to 10000 characters. If longer than this size, trim to 9999 and append with ellipsis
- Rely on the existing
- Introduce the
ignore_message_queuesconfiguration to disable instrumentation (message tagging) for specific
queues/topics as suggested in #710 - Capture predefined message headers and all properties
- Rely on the existing
ELASTIC_APM_CAPTURE_HEADERSagent config option. - Send as
context.message.headers - Sanitize sensitive headers/properties based on the
sanitize_field_namesconfig option
- Rely on the existing
- Added support for the MongoDB sync driver. See supported data stores.
Bug Fixes
Release 1.11.0
1.11.0
Features
- Add the ability to configure a unique name for a JVM within a service through the
service_node_nameconfig option - Add ability to ignore some exceptions to be reported as errors ignore_exceptions
- Applying new logic for JMS
javax.jms.MessageConsumer#receiveso that, instead of the transaction created for the
polling method itself (ie fromreceivestart to end), the agent will create a transaction attempting to capture
the code executed during actual message handling.
This logic is suitable for environments where polling APIs are invoked within dedicated polling threads.
This polling transaction creation strategy can be reversed through a configuration option (message_polling_transaction_strategy)
that is not exposed in the properties file by default. - Send IP obtained through
javax.servlet.ServletRequest#getRemoteAddr()incontext.request.socket.remote_address
instead of parsing from headers (#889) - Added
ElasticApmAttacher.attach(String propertiesLocation)to specify a custom properties location - Logs message when
transaction_max_spanshas been exceeded (#849) - Report the number of affected rows by a SQL statement (UPDATE,DELETE,INSERT) in 'affected_rows' span attribute (#707)
- Add
@Tracedannotation which either creates a span or a transaction, depending on the context - Report JMS destination as a span/transaction context field (#906)
- Added
capture_jmx_metricsconfiguration option
Bug Fixes
- JMS creates polling transactions even when the API invocations return without a message
- Support registering MBeans which are added after agent startup
Release 1.10.0
Features
- Add ability to manually specify reported hostname
- Add support for Redis Jedis client
- Add support for identifying target JVM to attach apm agent to using JVM property. See also the documentation of the
--includeand--excludeflags - Improve servlet error capture (#812)
Among others, now also takes Spring MVC@ExceptionHandlers into account - Instrument Logger#error(String, Throwable) (#821)
Automatically captures exceptions when callinglogger.error("message", exception) - Easier log correlation with https://github.com/elastic/java-ecs-logging. See docs.
- Avoid creating a temp agent file for each attachment (#859)
- Instrument
View#renderinstead ofDispatcherServlet#render(#829)
This makes the transaction breakdown graph more useful. Instead ofdispatcher-servlet, the graph now shows a type which is based on the view name, for example,FreeMarkerorThymeleaf. - Added
capture_jmx_metricsconfiguration option
UPDATE: due to a bug, the JMX metrics don't work in this version. See also #879
Bug Fixes
- Error in log when setting server_urls
to an empty string -co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Expected previousException not to be null - Avoid terminating the TCP connection to APM Server when polling for configuration updates (#823)
Release 1.9.0
Features
- Upgrading supported OpenTracing version from 0.31 to 0.33
- Added annotation and meta-annotation matching support for
trace_methods, for example:public @java.inject.* org.example.*(for annotation)public @@javax.enterprise.context.NormalScope org.example.*(for meta-annotation)
- The runtime attachment now also works when the
tools.jaror thejdk.attachmodule is not available.
This means you don't need a full JDK installation - the JRE is sufficient.
This makes the runtime attachment work in more environments such as minimal Docker containers.
Note that the runtime attachment currently does not work for OSGi containers like those used in many application servers such as JBoss and WildFly.
See the documentation for more information. - Support for Hibernate Search
Bug Fixes
- A warning in logs saying APM server is not available when using 1.8 with APM server 6.x. Due to that, agent 1.8.0 will silently ignore non-string labels, even if used with APM server of versions 6.7.x or 6.8.x that support such. If APM server version is <6.7 or 7.0+, this should have no effect. Otherwise, upgrade the Java agent to 1.9.0+.
ApacheHttpAsyncClientInstrumentationmatching increases startup time considerably- Log correlation feature is active when
active==false - Tomcat's memory leak prevention mechanism is causing a... memory leak. JDBC statement map is leaking in Tomcat if the application that first used it is udeployed/redeployed. See this related discussion.
Breaking Changes
- The
apm-agent-attach.jaris not executable anymore.
Useapm-agent-attach-standalone.jarinstead.
Release 1.8.0
Features
- Added support for tracking time spent by span type.
Can be disabled by settingbreakdown_metricstofalse. - Added support for central configuration.
Can be disabled by settingcentral_configtofalse. - Added support for Spring's JMS flavor - instrumenting
org.springframework.jms.listener.SessionAwareMessageListener - Added support to legacy ApacheHttpClient APIs (which adds support to Axis2 configured to use ApacheHttpClient)
- Added support for setting
server_urlsdynamically via properties file #723 - Added
config_fileoption - Added option to use
@javax.ws.rs.Pathvalue as transaction nameuse_jaxrs_path_as_transaction_name - Instrument quartz jobs (docs)
- SQL parsing improvements (#696)
- Introduce priorities for transaction name (#748)
Now uses the path as transaction name ifuse_path_as_transaction_nameis set totruerather thanServletClass#doGet. But if a name can be determined from a high level framework, like Spring MVC, that takes precedence.
User-supplied names from the API always take precedence over any others. - Use JSP path name as transaction name as opposed to the generated servlet class name (#751)
Bug Fixes
- Some JMS Consumers and Producers are filtered due to class name filtering in instrumentation matching
- Jetty: When no display name is set and context path is "/" transaction service names will now correctly fall back to configured values
- JDBC's
executeBatchis not traced - Drops non-String labels when connected to APM Server < 6.7 to avoid validation errors (#687)
- Parsing container ID in cloud foundry garden (#695)
- Automatic instrumentation should not override manual results (#752)
Breaking changes
- The log correlation feature does not add
span.idto the MDC anymore but onlytrace.idandtransaction.id(see #742).
Release 1.7.0
Features
- Added the
trace_methods_duration_thresholdconfig option. When using thetrace_methodsconfig option with wild cards, this
enables considerable reduction of overhead by limiting the number of spans captured and reported (see more details in config
documentation).
NOTE: Using wildcards is still not the recommended approach for thetrace_methodsfeature - Add
Transaction#addCustomContext(String key, String|Number|boolean value)to public API - Added support for AsyncHttpClient 2.x
- Added
global_labelsconfiguration option.
This requires APM Server 7.2+. - Added basic support for JMS- distributed tracing for basic scenarios of
send,receive,receiveNoWaitand
onMessage. Both Queues and Topics are supported. AsyncsendAPIs are not supported in this version.
NOTE: This feature is currently marked as "Incubating" and is disabled by default. In order to enable, it is
required to set thedisable_instrumentations
configuration property to an empty string. - Improved OSGi support: added a configuration option for
bootdelegationpackages (#641) - Better span names for SQL spans. For example,
SELECT FROM userinstead of justSELECT(#633)
Bug Fixes
- ClassCastException related to async instrumentation of Pilotfish Executor causing thread hang (applied workaround)
- NullPointerException when computing Servlet transaction name with null HTTP method name
- FileNotFoundException when trying to find implementation version of jar with encoded URL
- NullPointerException when closing Apache AsyncHttpClient request producer
- Fixes loading of
elasticapm.propertiesfor Spring Boot applications - Fix startup error on WebLogic 12.2.1.2.0 (#649)
- Disable metrics reporting and APM Server health check when active=false (#653)
Release 1.6.1
Bug Fixes
- Fixes transaction name for non-sampled transactions #581
- Makes log_file option work again #594
- Async context propagation fixes
- Fixes Manifest version reading error to support
jar:fileprotocol #601 - Fixes transaction name for non-sampled transactions #597
- Fixes potential classloader deadlock by preloading
FileSystems.getDefault()#603
Release 1.6.0
Features
- Support Apache HttpAsyncClient - span creation and cross-service trace context propagation
- Added the
jvm.thread.countmetric, indicating the number of live threads in the JVM (daemon and non-daemon) - Added support for WebLogic 12.2.x
- Added support for Spring
@Scheduledand EJB@Scheduleannotations - #569
Bug Fixes
- Avoid that the agent blocks server shutdown in case the APM Server is not available - #554
- Public API annotations improper retention prevents it from being used with Groovy - #567
- Eliminate side effects of class loading related to Instrumentation matching mechanism
Related Announcements
- Java APM Agent became part of the Cloud Foundry Java Buildpack as of Release v4.19
Release 1.5.0
Potentially breaking changes
- 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.
Features
- Added property "allow_path_on_hierarchy" to JAX-RS plugin, to lookup inherited usage of
@path. - Support for number and boolean labels in the public API (#497).
This change also renamestagtolabelon the API level to be compliant with the Elastic Common Schema (ECS).
TheaddTag(String, String)method is still supported but deprecated in favor ofaddLabel(String, String).
As of version 7.x of the stack, labels will be stored underlabelsin Elasticsearch.
Previously, they were stored undercontext.tags.
Number and boolean labels were only introduced in APM Server 6.7+. Using this API in combination with an older APM Server versions leads to validation errors. - Support async queries made by Elasticsearch REST client.
- Added
setStartTimestamp(long epochMicros)andend(long epochMicros)API methods toSpanandTransaction, allowing to set custom start and end timestamps. - Auto-detection of the
service_namebased on the<display-name>element of theweb.xmlwith a fallback to the servlet context path.
If you are using a spring-based application, the agent will use the setting forspring.application.namefor itsservice_name.
See the documentation forservice_namefor more information.
Note: this requires APM Server 7.0+. If using previous versions, nothing will change. - Previously, enabling
capture_bodycould only capture form parameters.
Now it supports all UTF-8 encoded plain-text content types.
The optioncapture_body_content_typescontrols whichContent-Types should be captured. - Support async calls made by OkHttp client (
Call#enqueue). - Added support for providing config options on agent attach.
- CLI example:
--config server_urls=http://localhost:8200,http://localhost:8201 - API example:
ElasticApmAttacher.attach(Map.of("server_urls", "http://localhost:8200,http://localhost:8201"));
- CLI example:
Bug Fixes
- Logging integration through MDC is not working properly - #499
- ClassCastException with adoptopenjdk/openjdk11-openj9 - #505
- Span count limitation is not working properly - reported in our forum
- Java agent causes Exceptions in Alfresco cluster environment due to failure in the instrumentation of Hazelcast
Executors - reported in our forum
Release 1.4.0
Features
- Added support for sync calls of OkHttp client
- Added support for context propagation for
java.util.concurrent.ExecutorServices - The
trace_methodsconfiguration now allows to omit the method matcher.
Example:com.example.*traces all classes and methods within thecom.examplepackage and sub-packages. - Added support for JSF. Tested on WildFly, WebSphere Liberty and Payara with embedded JSF implementation and on Tomcat and Jetty with MyFaces 2.2 and 2.3
- Introduces a new configuration option
disable_metricswhich disables the collection of metrics via a wildcard expression. - Support for HttpUrlConnection
- Adds
subtypeandactionto spans. This replaces former typing mechanism where type, subtype and action were all set through the type in an hierarchical dotted-syntax. In order to support existing API usages, dotted types are parsed into subtype and action, howeverSpan.createSpanandSpan.setTypeare deprecated starting this version. Instead, type-less spans can be created using the newSpan.startSpanAPI and typed spans can be created using the newSpan.startSpan(String type, String subtype, String action)API - Support for JBoss EAP 6.4, 7.0, 7.1 and 7.2
- Improved startup times
- Support for SOAP (JAX-WS).
SOAP client create spans and propagate context.
Transactions are created for@WebServiceclasses and@WebMethodmethods.
Bug Fixes
- Fixes a failure in BitBucket when agent deployed (#349)
- Fixes increased CPU consumption (#443 and #453)
- Fixed some OpenTracing bridge functionalities that were not working when auto-instrumentation is disabled
- Fixed an error occurring when ending an OpenTracing span before deactivating
- Sending proper
nullfor metrics that have a NaN value - Fixes JVM crash with Java 7 (#458)
- Fixes an application deployment failure when using EclipseLink and
trace_methodsconfiguration (#474)