Skip to content

OSS + Enterprise Sentry support#178

Merged
acunniffe merged 19 commits intomainfrom
feat/sentry
Nov 2, 2025
Merged

OSS + Enterprise Sentry support#178
acunniffe merged 19 commits intomainfrom
feat/sentry

Conversation

@acunniffe
Copy link
Copy Markdown
Collaborator

@acunniffe acunniffe commented Nov 1, 2025

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.

@acunniffe acunniffe requested a review from svarlamov November 1, 2025 19:17
authorship::working_log::CheckpointKind, observability::log_performance, utils::debug_log,
};

pub fn log_performance_target_if_violated(
Copy link
Copy Markdown
Collaborator Author

@acunniffe acunniffe Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@svarlamov let's sync on defining our internal targets.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. The biggest thing I noticed in playing around with it is that we probably need to set a floor on the 10% (at least for now). So like max(10% or 70ms)

➜  git-ai git:(feat/sentry) GIT_AI_DEBUG_PERFORMANCE=1 git commit
On branch feat/sentry
Your branch is up to date with 'origin/feat/sentry'.

nothing to commit, working tree clean
[git-ai (perf)] ᕽ Performance target violated for command: commit. Total duration: 51ms, Git duration: 7ms. Pre-command: 44ms, Post-command: 0ms.

@git-ai-cloud-dev
Copy link
Copy Markdown

git-ai-cloud-dev Bot commented Nov 2, 2025

you  ████████████████████████░░░░░░░░░░░░░░░░ ai
      61%                                                                                                         39%

AI code tracked with git-ai

Copy link
Copy Markdown
Member

@svarlamov svarlamov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. Left some thoughts on the thresholds

@acunniffe acunniffe merged commit 61b671d into main Nov 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants