grafana/grafana
By the numbers
A quantitative snapshot of the Grafana repository.
Data collected on 2026-04-30 against commit
837f0fcd393onmain.
Size
xychart-beta horizontal
title "Source lines of code by language (non-test)"
x-axis ["Go", "TypeScript", "TSX (React)"]
y-axis "Lines" 0 --> 320000
bar [270475, 175000, 116000]| Metric | Count |
|---|---|
| Go source files (non-test) | ~4,200 |
Go test files (*_test.go) |
1,755 |
| TypeScript / TSX files (non-test) | ~6,000 |
TS/TSX test files (.test.* / .spec.*) |
2,275 |
| Lines of Go code (non-test) | 270,475 |
| Lines of TS/TSX code (non-test) | ~291,000 |
Top-level workspaces (packages/*) |
16 |
Backend apps/ modules |
21 |
Built-in datasource plugins (public/app/plugins/datasource/) |
~30 |
Backend service domains (pkg/services/*) |
73 |
pkg/tsdb/ datasource backends |
19 |
The codebase is roughly balanced between Go and TypeScript — neither side is dominant. A large portion of the lines in apps/ are generated OpenAPI / CRD code (zz_generated_*.go, *_spec_gen.go).
Activity
| Metric | Value |
|---|---|
Total commits on main |
68,721 |
| First commit date | 2013-01-25 |
| Latest commit date (snapshot) | 2026-04-29 |
| Unique committers across history | ~3,225 |
Hot directories (last 90 days)
| Directory | Files touched |
|---|---|
public/app/ |
11,555 |
pkg/services/ |
2,823 |
apps/dashboard/ |
2,023 |
pkg/registry/ |
1,908 |
public/locales/ |
1,478 |
packages/grafana-ui/ |
1,332 |
pkg/tests/ |
1,251 |
pkg/storage/ |
1,054 |
docs/sources/ |
846 |
packages/grafana-data/ |
560 |
Most-changed individual files (last 90 days)
| File | Touches |
|---|---|
public/locales/en-US/grafana.json |
344 |
pkg/services/featuremgmt/registry.go |
197 |
pkg/services/featuremgmt/toggles_gen.csv |
196 |
pkg/services/featuremgmt/toggles_gen.json |
191 |
packages/grafana-data/src/types/featureToggles.gen.ts |
170 |
yarn.lock |
132 |
go.mod |
129 |
pkg/services/featuremgmt/toggles_gen.go |
112 |
The frequent churn in featuremgmt/ and the auto-generated toggle files is normal — every PR that adds or modifies a feature flag re-runs make gen-feature-toggles which rewrites this set of files.
Bot-attributed commits
xychart-beta horizontal
title "Commit attribution (all-time)"
x-axis ["Human-authored", "Bot-attributed"]
y-axis "Commits" 0 --> 70000
bar [65327, 3394]About 4.9 % of historical commits have a bot signature in the author or trailers (grafana-delivery-bot, dependabot[bot], github-actions[bot], renovate[bot]). This is a lower bound — inline AI-assisted edits made by humans through editors are indistinguishable from regular commits.
Complexity hotspots
Largest non-generated Go files
The largest Go files in the repo as a whole are generated (zz_generated_* and *_spec_gen.go) and cluster around the apps/dashboard/ and apps/iam/ API surface.
Largest non-test TS files
Many of the largest TS files are mock fixtures or content tables. The biggest piece of "real" runtime code is the Tempo datasource (tempo/datasource.ts), which is a known refactor candidate.
Dependencies
- Go: hundreds of direct entries in
go.mod(756 lines), each annotated with an owning team via// @grafana/<team>comments. - JS: thousands of resolutions in
yarn.lock(1.3 MB). - Mono-go workspace: 22 modules listed in
go.work(the root + everyapps/<name>module + a few helpers).
See Dependencies for ownership detail.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.
Previous
Glossary
Next
Lore