Automatic Instrumentation in the IDE
Last updated
Last updated
The easiest way to get started with Digma is to use the Digma plugin to automatically instrument your application when you run it in the IDE.
To get started, make sure that that Observability
toggle is set to on. You can always use this control to turn auto-instrumentation on and off.
By default, when you enable the observability toggle, Digma will download and add the OTEL Java Agent and dynamically add it to your runtime configuration when you launch your application in the IDE. In addition, the Digma Agent extension is also downloaded and referenced to add additional instrumentation data.
Running your application in the IDE you should expect to see the following messages in the console output:
If everything works well, after triggering several actions on your applications you should see the observability panel update to show the recent activity:
The Java OTEL Agent supported libraries page maintains an exhaustive list of frameworks and libraries currently automatically instrumented by the Java OTEL agent. For any of these frameworks, without any code changes, Digma will automatically receive and process tracing data that includes endpoint information, database queries, consumer data, and more.
With the observability toggle enabled, auto-instrumentation will automatically be added to the following run configurations:
Java applications configuration type
Spring applications using the Spring plugin
Specific common Maven / Gradle tasks for running application
Other plugins (Tomcat, others)
However, Digma will purposely not instrument *every* Run Configuration, as it can be harmful to add the agent instrumentation to utility or build tasks. If Digma is not automatically adding instrumentation to your custom Gradle or Maven task, you can add the DIGMA_OBSERVABILITY=true
environment variable. This will ensure the Digma Plugin will instrument the run configuration configuration.