Skip to content

Releases: elastic/apm-agent-java

Release 1.7.0

13 Jun 10:26
Compare
Choose a tag to compare

Features

  • Added the trace_methods_duration_threshold config option. When using the trace_methods config 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 the trace_methods feature
  • Add Transaction#addCustomContext(String key, String|Number|boolean value) to public API
  • Added support for AsyncHttpClient 2.x
  • Added global_labels configuration option.
    This requires APM Server 7.2+.
  • Added basic support for JMS- distributed tracing for basic scenarios of send, receive, receiveNoWait and
    onMessage. Both Queues and Topics are supported. Async send APIs 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 the disable_instrumentations
    configuration property to an empty string.
  • Improved OSGi support: added a configuration option for bootdelegation packages (#641)
  • Better span names for SQL spans. For example, SELECT FROM user instead of just SELECT (#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.properties for 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

26 Apr 12:12
Compare
Choose a tag to compare

Bug Fixes

  • Fixes transaction name for non-sampled transactions #581
  • Makes log_file option work again #594
  • Async context propagation fixes
    • Fixing some async mechanisms lifecycle issues #605
    • Fixes exceptions when using WildFly managed executor services #589
    • Exclude glassfish Executor which does not permit wrapped runnables #596
    • Exclude DumbExecutor #598
  • Fixes Manifest version reading error to support jar:file protocol #601
  • Fixes transaction name for non-sampled transactions #597
  • Fixes potential classloader deadlock by preloading FileSystems.getDefault() #603

Release 1.6.0

16 Apr 15:39
Compare
Choose a tag to compare

Features

  • Support Apache HttpAsyncClient - span creation and cross-service trace context propagation
  • Added the jvm.thread.count metric, indicating the number of live threads in the JVM (daemon and non-daemon)
  • Added support for WebLogic 12.2.x
  • Added support for Spring @Scheduled and EJB @Schedule annotations - #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

26 Mar 11:37
Compare
Choose a tag to compare

Potentially breaking changes

  • If you didn't explicitly set the service_name previously and you are dealing with a servlet-based application (including Spring Boot), your service_name will change.
    See the documentation for service_name and 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 renames tag to label on the API level to be compliant with the Elastic Common Schema (ECS).
    The addTag(String, String) method is still supported but deprecated in favor of addLabel(String, String).
    As of version 7.x of the stack, labels will be stored under labels in Elasticsearch.
    Previously, they were stored under context.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) and end(long epochMicros) API methods to Span and Transaction, allowing to set custom start and end timestamps.
  • Auto-detection of the service_name based on the <display-name> element of the web.xml with a fallback to the servlet context path.
    If you are using a spring-based application, the agent will use the setting for spring.application.name for its service_name.
    See the documentation for service_name for more information.
    Note: this requires APM Server 7.0+. If using previous versions, nothing will change.
  • Previously, enabling capture_body could only capture form parameters.
    Now it supports all UTF-8 encoded plain-text content types.
    The option capture_body_content_types controls which Content-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"));

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

14 Feb 11:33
Compare
Choose a tag to compare

Features

  • Added support for sync calls of OkHttp client
  • Added support for context propagation for java.util.concurrent.ExecutorServices
  • The trace_methods configuration now allows to omit the method matcher.
    Example: com.example.* traces all classes and methods within the com.example package 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_metrics which disables the collection of metrics via a wildcard expression.
  • Support for HttpUrlConnection
  • Adds subtype and action to 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, however Span.createSpan and Span.setType are deprecated starting this version. Instead, type-less spans can be created using the new Span.startSpan API and typed spans can be created using the new Span.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 @WebService classes and @WebMethod methods.

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 null for metrics that have a NaN value
  • Fixes JVM crash with Java 7 (#458)
  • Fixes an application deployment failure when using EclipseLink and trace_methods configuration (#474)

Release 1.3.0

10 Jan 17:08
Compare
Choose a tag to compare

Features

  • The agent now collects system and JVM metrics (#360)
  • Add API methods ElasticApm#startTransactionWithRemoteParent and Span#injectTraceHeaders to allow for manual context propagation (#396).
  • Added trace_methods configuration option which lets you define which methods in your project or 3rd party libraries should be traced.
    To create spans for all public methods of classes whose name ends in Service which are in any sub-package of org.example.services use this matcher:
    public org.example.services.*Service#* (#398)
  • Added span for DispatcherServlet#render (#409).
  • Flush reporter on shutdown to make sure all recorded Spans are sent to the server before the programm exits (#397)
  • Adds Kubernetes (#383) (#344) and Docker metadata (#325) to enable correlation with the Kibana Infra UI.
  • Improved error handling of the Servlet Async API (#399)
  • Support async API’s used with AsyncContext.start (#388)

Bug Fixes

  • Fixing a potential memory leak when there is no connection with APM server
  • Fixes NoSuchMethodError CharBuffer.flip() which occurs when using the Elasticsearch RestClient and Java 7 or 8 (#401)

Release 1.2.0

19 Dec 11:45
Compare
Choose a tag to compare

Features

  • Added capture_headers configuration option.
    Set to false to disable capturing request and response headers.
    This will reduce the allocation rate of the agent and can save you network bandwidth and disk space.
  • Makes the API methods addTag, setName, setType, setUser and setResult fluent, so that calls can be chained.

Bug Fixes

  • Catch all errors thrown within agent injected code
  • Enable public APIs and OpenTracing bridge to work properly in OSGi systems, fixes this WildFly issue
  • Remove module-info.java to enable agent working on early Tomcat 8.5 versions
  • Fix async Servlet API issue

Release 1.1.0

28 Nov 09:06
Compare
Choose a tag to compare

Features

  • Some memory allocation improvements
  • Enabling bootdelegation for agent classes in Atlassian OSGI systems

Bug Fixes

  • Update dsl-json which fixes a memory leak.
    See ngs-doo/dsl-json#102 for details.
  • Avoid VerifyErrors by non instrumenting classes compiled for Java 4 or earlier
  • Enable APM Server URL configuration with path (fixes #339)
  • Reverse system.hostname and system.platform order sent to APM server

Release 1.0.1

15 Nov 16:45
Compare
Choose a tag to compare

Bug Fixes

  • Fixes NoSuchMethodError CharBuffer.flip() which occurs when using the Elasticsearch RestClient and Java 7 or 8 (#313)

Release 1.0.0

14 Nov 20:18
Compare
Choose a tag to compare

Breaking changes

  • 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.

Features

  • Adds @CaptureTransaction and @CaptureSpan annotations which let you declaratively add custom transactions and spans.
    Note that it is required to configure the application_packages for this to work.
    See the documentation for more information.
  • The public API now supports to activate a span on the current thread.
    This makes the span available via ElasticApm#currentSpan()
    Refer to the documentation for more details.
  • Capturing of Elasticsearch RestClient 5.0.2+ calls.
    Currently, the *Async methods are not supported, only their synchronous counterparts.
  • Added API methods to enable correlating the spans created from the JavaScrip Real User Monitoring agent with the Java agent transaction.
    More information can be found in the documentation.
  • Added Transaction.isSampled() and Span.isSampled() methods to the public API
  • Added Transaction#setResult to the public API (#293)

Bug Fixes

  • Fix for situations where status code is reported as 200, even though it actually was 500 (#225)
  • Capturing the username now properly works when using Spring security (#183)