aboutsummaryrefslogtreecommitdiffstats
path: root/packages/db/package.json
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-02-07 09:37:48 +0000
committerMohamed Bassem <me@mbassem.com>2026-02-08 00:18:58 +0000
commit9e5693c6e4b410d1af05cc3d50c89ff73f21e060 (patch)
tree63f18bc726105383b075369511b0eb168e697551 /packages/db/package.json
parente59fd98b43070898c594c35af1a0bbee604ad160 (diff)
downloadkarakeep-9e5693c6e4b410d1af05cc3d50c89ff73f21e060.tar.zst
feat(db): add OpenTelemetry instrumentation for database queries
Instruments the better-sqlite3 driver so that every prepared statement execution (run/get/all) produces an OTel span with db.system, db.statement, and db.operation attributes. The instrumentation is a no-op when no TracerProvider is registered (i.e. tracing is disabled). https://claude.ai/code/session_01JZut7LqeHPUKAFbFLfVP8F
Diffstat (limited to 'packages/db/package.json')
-rw-r--r--packages/db/package.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/db/package.json b/packages/db/package.json
index 5908f44a..80bb19ac 100644
--- a/packages/db/package.json
+++ b/packages/db/package.json
@@ -18,6 +18,7 @@
"dependencies": {
"@auth/core": "^0.27.0",
"@karakeep/shared": "workspace:*",
+ "@opentelemetry/api": "^1.9.0",
"@paralleldrive/cuid2": "^2.2.2",
"better-sqlite3": "^11.3.0",
"dotenv": "^16.4.1",