github microsoft/ApplicationInsights-Java 3.4.0
Application Insights Java 3.4.0 (GA)

latest releases: 3.6.0, 3.5.4, 3.5.3...
2 years ago

Migration notes:

  • Rate-limited sampling is now the default, if you haven't configured a fixed percentage previously. By default, it will capture at most around five requests per second, along with their dependencies, traces, and custom events. See fixed-percentage sampling if you want to revert to the previous behavior of capturing 100% of requests.

Enhancements:

  • Standard metrics for HTTP requests and HTTP dependencies are now pre-aggregated inside of the Java agent, and so they are no longer affected by sampling (#2439).
  • Rate-limited sampling has been introduced which can be used to tune ingestion costs (#2456), e.g.
    {
      "sampling": {
        "requestsPerSecond": 5
      }
    }
    
    Note: the requestsPerSecond can be a decimal value, including values less than 1.
  • Exceptions are no longer captured directly on dependency records for these reasons:
    • in order to reduce ingestion cost
    • dependency exceptions which are uncaught, bubble up to the request-level where they are already captured
    • dependency exceptions which are caught, tend to be logged if they are important, where they are also already captured
      (#2423).
  • New versions of the applicationinsights-core and applicationinsights-web 2.x SDK artifacts have been released, with a reduced API surface area to makes it clear which APIs interop with the 3.x Java agent (#2418). These new versions are no-ops when run without the Java agent. To update your dependencies:
    2.x dependency Action Remarks
    applicationinsights-core Update the version to 3.4.0-BETA or later
    applicationinsights-web Update the version to 3.4.0-BETA or later, and remove the Application Insights web filter your web.xml file.
    applicationinsights-web-auto Replace with 3.4.0-BETA or later of applicationinsights-web
    applicationinsights-logging-log4j1_2 Remove the dependency and remove the Application Insights appender from your log4j configuration. This is no longer needed since Log4j 1.2 is auto-instrumented in the 3.x Javaagent.
    applicationinsights-logging-log4j2 Remove the dependency and remove the Application Insights appender from your log4j configuration. This is no longer needed since Log4j 2 is auto-instrumented in the 3.x Javaagent.
    applicationinsights-logging-log4j1_2 Remove the dependency and remove the Application Insights appender from your logback configuration. This is no longer needed since Logback is auto-instrumented in the 3.x Javaagent.
    applicationinsights-spring-boot-starter Replace with 3.4.0-BETA or later of applicationinsights-web The cloud role name will no longer default to spring.application.name, see the 3.x configuration docs for configuring the cloud role name.
  • ConnectionString overrides were introduced, and InstrumentationKey overrides were deprecated (#2471):
    {
      "preview": {
        "connectionStringOverrides": [
          {
            "httpPathPrefix": "/myapp1",
            "connectionString": "InstrumentationKey=12345678-0000-0000-0000-0FEEDDADBEEF;IngestionEndpoint=...;..."
          },
          {
            "httpPathPrefix": "/myapp2",
            "connectionString": "InstrumentationKey=87654321-0000-0000-0000-0FEEDDADBEEF;IngestionEndpoint=...;..."
          }
        ]
      }
    }
    
  • Configuration to disable jdbc masking was introduced (#2453):
    {
      "instrumentation": {
        "jdbc": {
          "masking": {
            "enabled": false
          }
        }
      }
    }
    
  • Sampling overrides can (and should) now be targeted to requests, dependencies, traces (logs) or exceptions (#2456), e.g.
    {
      "preview": {
        "sampling": {
          "overrides": [
            {
              "telemetryKind": "dependency",
              ...
              "percentage": 0
            }
          ]
        }
      }
    }
    
  • Ingestion response codes 502 and 504 now trigger storing telemetry to disk and retrying (#2438).
  • Metric namespaces are now supported via the new 3.x applicationinsights-core artifact (#2447).
  • Ingestion sampling warnings are now suppressed since those are expected (#2473).
  • Introduce a new preview feature: Java Profiler for Azure Monitor Application Insights
  • Update OpenTelemetry to 1.18.0 #2509.
  • Remove limit on filtering default metrics #2490.
  • Add a new config to export logback code attributes #2518

Bug Fixes:

  • Fix operation_Id and operation_parentID being captured as 00000000000000000000000000000000 for "standalone" log records (which occur outside of a request). These fields are now empty for "standalone" log records, to reflect that they are not part of an "operation" (i.e. request) #2432.

Don't miss a new ApplicationInsights-Java release

NewReleases is sending notifications on new releases.