Skip to main content
Version: 4.2

Production & Tooling

This page maps each stage of a Koin project to the tool that covers it. Koin itself covers build time, development and tests. For production, Kotzilla (the company that builds Koin) offers an optional monitoring platform.

Everything in Koin works without any of the tools on this page except the ones that ship with Koin. Pick what matches your need.

Which tool for which need​

StageNeedToolShips with Koin
Build timeFail the build on a missing dependency or a wrong qualifierCompile-Time Safety with the Koin Compiler PluginYes
DevelopmentSee what Koin creates and resolvesLogging with printLogger() or a platform loggerYes
DevelopmentNavigate between definitions and injection points, see issues in the editorIDE Plugin for Android Studio and IntelliJ IDEANo, free plugin by Kotzilla
TestsCheck a module configuration without running the appVerifying Modules with verify()Yes
TestsReplace definitions with fakes or mocksTesting with KoinTestYes
ProductionTrace the execution time of chosen functions@Monitor, with the Kotzilla SDKAnnotation yes, tracing needs the SDK
ProductionSee startup, main thread and background performance issues and crashes from real user sessionsProduction Monitoring with the Kotzilla platformNo, Kotzilla service

Build time​

The Koin Compiler Plugin checks your dependency graph during compilation. A missing definition, a missing qualifier or an unknown scope fails the build with a KOIN-Dxxx diagnostic instead of crashing at runtime. This is the first line of defense: see Compile-Time Safety for what is validated and how to set it up.

Development​

The Koin logger prints module loading and instance creation. Turn it on with printLogger(Level.DEBUG) or a platform logger (androidLogger(), SLF4J). It writes raw text to the console or Logcat, so it is a debugging aid, not a monitoring tool. See Logging.

The IDE Plugin adds navigation, a tree view of modules and definitions, and configuration checks in the editor.

Tests​

verify() checks that every definition in a module can be built, from a plain JUnit test. If you use the Compiler Plugin, compile-time safety already covers most of what verify() checks. See Verifying Modules and Testing.

Production​

Compile-time safety and tests catch configuration errors. They don't tell you how the graph behaves on real devices: how long resolutions take at startup, which dependency blocks the main thread, which crash comes from a Koin resolution.

Koin has no production monitoring of its own. The Kotzilla platform covers this need, through the Kotzilla SDK that plugs into the Koin container. See Production Monitoring. The @Monitor annotation extends it to your own functions.