Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sentry): Add sentry environment support #49

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
if [[ -f .env ]]; then
dotenv .env
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
__pycache__/

.coverage
.env
6 changes: 6 additions & 0 deletions devservices/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import argparse
import atexit
import os
from importlib import metadata

import sentry_sdk
Expand All @@ -14,12 +15,17 @@
from devservices.commands import status
from devservices.commands import stop

sentry_environment = (
"development" if os.environ.get("IS_DEV", default=False) else "production"
)

sentry_sdk.init(
dsn="https://56470da7302c16e83141f62f88e46449@o1.ingest.us.sentry.io/4507946704961536",
traces_sample_rate=1.0,
profiles_sample_rate=1.0,
enable_tracing=True,
integrations=[ArgvIntegration()],
environment=sentry_environment,
)


Expand Down