Skip to content

Commit

Permalink
Add OpenTelemetry tracing via Sentry (#38)
Browse files Browse the repository at this point in the history
* Add OpenTelemetry tracing via Sentry

This adds OpenTelemetry tracing via Sentry to the base model class,
which applies it to all models.

It currently makes Sentry a peer dependency, which means we either need
to do a major version bump and force all users into Sentry, or find a
way to conditionally import Sentry and handle the case where it's not
installed.

* Add Sentry tags for prompt name and version

* Wrap telemetry code in try/catch for extra safety

* Fix accidentally updated pnpm-lock.yaml
  • Loading branch information
rileytomasek authored Jun 3, 2024
1 parent 48eee72 commit 8a5d839
Show file tree
Hide file tree
Showing 4 changed files with 2,065 additions and 1,230 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
},
"devDependencies": {
"@dexaai/eslint-config": "^0.4.0",
"@sentry/node": "^8.7.0",
"@types/node": "^20.12.12",
"dotenv-cli": "^7.4.2",
"eslint": "^8.54.0",
Expand All @@ -97,5 +98,8 @@
"vite": "^5.2.11",
"vitest": "^1.6.0"
},
"peerDependencies": {
"@sentry/node": "8.x"
},
"packageManager": "pnpm@8.6.12"
}
Loading

0 comments on commit 8a5d839

Please sign in to comment.