Statistics

Last modified: 30 October 2024

When run with the IntelliJ Kotlin plugin, the Analysis API optionally allows gathering statistics (such as metrics) about analysis activity. All data is saved locally in a log file. It is not sent over any network connection. Furthermore, the feature requires an explicit opt-in.

These statistics allow us as Analysis API developers to better understand how the Analysis API handles certain workloads. For you as a user of the Analysis API, the statistics can also provide some insights into how your plugin uses the Analysis API. The log files are easily shareable, allowing you to send them to us if you encounter any problems (especially around performance and memory consumption) or include them in your YouTrack issues.

As of now, we are tracking only a few metrics, but we're planning to add many more. It's also worth noting that only the K2 backend of the Analysis API collects statistics.

The feature is built on the same OpenTelemetry-based framework as IntelliJ's tracing and metrics collection, so using the approach described in this guide can also help with IntelliJ-specific statistics such as virtual file system metrics. The framework is mainly developed for internal use: it is not a public API and JetBrains makes no compatibility guarantees. Nonetheless, you're welcome to use it as an external user.