Skip to content

Commit 1c60d0b

Browse files
committed
Fix: 開発環境では Sentry を無効化する
1 parent 4eee875 commit 1c60d0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ def main() -> None:
349349
if args.output_log_utf8:
350350
set_output_log_utf8()
351351

352-
# Sentry によるエラートラッキングを開始
352+
# Sentry によるエラートラッキングを開始 (production 環境のみ有効)
353353
# ref: https://docs.sentry.io/platforms/python/integrations/fastapi/
354-
if not args.disable_sentry:
354+
if not args.disable_sentry and __version__ != "latest":
355355
sentry_sdk.init(
356356
dsn="https://ebdf5cc288b3ab31a262186329ff3a95@o4508551725383680.ingest.us.sentry.io/4508555159470080",
357357
release=f"AivisSpeech-Engine@{__version__}",
358-
environment="development" if __version__ == "latest" else "production",
358+
environment="production",
359359
# Set traces_sample_rate to 1.0 to capture 100%
360360
# of transactions for tracing.
361361
traces_sample_rate=1.0,

0 commit comments

Comments
 (0)