Staso Docs
Platform

Git tracking

Every trace carries its commit, branch, and dirty state.

How it works

st.init(capture_git=True) is the default. The SDK detects commit context once at init and tags every trace.

Detection order:

  1. STASO_VCS_* env vars (explicit override).
  2. CI/CD provider env vars.
  3. Local .git/ directory via the git CLI.
  4. .staso-build-info JSON file next to your app.
FieldExample
vcs.commit.sha3f2a1b9... (40-char SHA)
vcs.branchmain
vcs.repo_urlhttps://github.com/acme/agent
vcs.is_dirtytrue when uncommitted changes exist

The dashboard filters, groups, and diffs by any of these.

CI/CD auto-detection

GitHub Actions, Vercel, Railway, Heroku, GitLab CI, CircleCI, Bitbucket Pipelines, AWS CodeBuild, Netlify, Azure DevOps.

If your platform ships commit env vars under a different name, use the manual override below.

Manual override

Cleanest path in Docker, Kubernetes, and serverless:

export STASO_VCS_COMMIT_SHA=$GIT_COMMIT
export STASO_VCS_BRANCH=$GIT_BRANCH
export STASO_VCS_REPO_URL=https://github.com/acme/agent

These take precedence over everything else.

Disable

st.init(api_key="ak_...", capture_git=False)

Why it matters

  • Regression detection — latency or error spikes pinned to a commit.
  • Rollback decisions — see what the previous green commit actually did.
  • Fix verification — confirm bad behavior is gone on the new SHA.
  • Heal context — the auto-diagnoser uses commit and diff to reason about what changed.

Next