Class ApplicationInsights

java.lang.Object
com.microsoft.applicationinsights.attach.ApplicationInsights

public final class ApplicationInsights extends Object
This class allows you to attach the Application Insights agent for Java at runtime.
  • Field Details

    • APPLICATIONINSIGHTS_RUNTIME_ATTACH_CONFIGURATION_FILE

      public static final String APPLICATIONINSIGHTS_RUNTIME_ATTACH_CONFIGURATION_FILE
      This property allows configuring an Application Insights json file. It can be helpful to get an Application Insights json file by Spring profile.
      See Also:
  • Method Details

    • attach

      public static void attach()
      Attach the Application Insights agent for Java to the current JVM. The attachment must be requested at the beginning of the main method.
      Throws:
      ApplicationInsights.ConfigurationException - If the file given by the applicationinsights.runtime-attach.configuration.classpath.file property was not found