Skip to content

Commit b7655ff

Browse files
committed
feat: add environment configuration support for Sentry integration
1 parent b435bf1 commit b7655ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
profile_session_sample_rate = float(os.getenv("GITINGEST_SENTRY_PROFILE_SESSION_SAMPLE_RATE", "1.0"))
3434
profile_lifecycle = os.getenv("GITINGEST_SENTRY_PROFILE_LIFECYCLE", "trace")
3535
send_default_pii = os.getenv("GITINGEST_SENTRY_SEND_DEFAULT_PII", "true").lower() == "true"
36+
sentry_environment = os.getenv("GITINGEST_SENTRY_ENVIRONMENT", "")
3637

3738
sentry_sdk.init(
3839
dsn=sentry_dsn,
@@ -44,6 +45,8 @@
4445
profile_session_sample_rate=profile_session_sample_rate,
4546
# Set profile_lifecycle to automatically run the profiler
4647
profile_lifecycle=profile_lifecycle,
48+
# Set environment name
49+
environment=sentry_environment,
4750
)
4851

4952
# Initialize the FastAPI application with lifespan

0 commit comments

Comments
 (0)