[PR #178] OSS + Enterprise Sentry support #305

Closed
opened 2026-03-02 04:13:14 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/178

State: closed
Merged: Yes


This PR introduces support for logging performance metrics + errors to Sentry compatible endpoints

OSS releases will have telemetry enabled by default starting in 1.0.15. There's a flag in config.json to disable it

   "telemetry_oss": "off"

Enterprises can set their own DSN using

   "telemetry_enterprise_dsn": "<dsn>"

Or by building from source and setting SENTRY_ENTERPRISE=<dsn> cargo build

--

what's logged?

  • Any errors from a pre commit or post commit hook (should not include user data).
  • Performance violations. if we're outside our target overhead for wrapping git commands, the timings for pre/post commit hooks will be logged.
  • operating system, version
  • remote URLs of repos

--

performance impact

because git-ai is a git wrapper and does not want to introduce any major overhead to a git command. So we're trading realtime logs for performance. Logs are buffered in an append-onlyai/log file (one per pid to prevent locking). Logs are then sent to the server only when you do a git fetch or git push. A background process is enqueued to mop up the logs and send them off without slowing those commands down.

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/178 **State:** closed **Merged:** Yes --- This PR introduces support for logging performance metrics + errors to Sentry compatible endpoints OSS releases will have telemetry enabled by default starting in `1.0.15`. There's a flag in `config.json` to disable it ``` "telemetry_oss": "off" ``` Enterprises can set their own DSN using ``` "telemetry_enterprise_dsn": "<dsn>" ``` Or by building from source and setting `SENTRY_ENTERPRISE=<dsn> cargo build` -- **what's logged?** - Any errors from a pre commit or post commit hook (should not include user data). - Performance violations. if we're outside our target overhead for wrapping git commands, the timings for pre/post commit hooks will be logged. - operating system, version - remote URLs of repos -- **performance impact** because git-ai is a git wrapper and does not want to introduce any major overhead to a git command. So we're trading realtime logs for performance. Logs are buffered in an append-only`ai/log` file (one per pid to prevent locking). Logs are then sent to the server only when you do a git fetch or git push. A background process is enqueued to mop up the logs and send them off without slowing those commands down.
kerem 2026-03-02 04:13:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#305
No description provided.