Kappa: Klarna Application Analytics
Kappa is an application-layer analytics and analysis tool designed to help organizations keep massive Erlang codebases, developed by multiple independent teams, maintainable and healthy.
Kappa was originally devised and conceptualized by Erik Stenman while at Klarna to address the complexity of Klarna's large-scale, fast-evolving backend. Today, Kappa is open source and can be used by any organization facing similar challenges.
Purpose
Understand, analyze, and keep large Erlang codebases in check.
Provenance
Developed and introduced at Klarna, now available to the community.
Key Features
- Code and Database Ownership: Track which team owns each app/module/database table
- Application API Modules: Restrict inter-app calls to only designated API modules
- Restricted Record Access: Control direct access to record fields in header files
- Code Layers: Divide apps into layers with enforced call restrictions
Why Kappa?
Managing large Erlang systems requires discipline:
- Prevent unauthorized cross-app calls
- Maintain clear ownership boundaries
- Enforce architectural constraints
- Scale development across teams
Getting Started
rebar3 escriptize
_build/default/bin/kappa
# Check API violations
kappa api
# Check layer violations
kappa layers
See the GitHub repository for full configuration and usage examples.