add instance name as tag to sentry reports

This commit is contained in:
Jenny Danzmayr 2025-01-22 20:26:21 +01:00
parent 8c0e258a65
commit 9ffd6131fb

View file

@ -74,6 +74,8 @@ with suppress(ImportError):
enable_tracing=bool(config.getfloat('sentry', 'traces_sample_rate', fallback=0.0)), enable_tracing=bool(config.getfloat('sentry', 'traces_sample_rate', fallback=0.0)),
traces_sample_rate=config.getfloat('sentry', 'traces_sample_rate', fallback=0.0), traces_sample_rate=config.getfloat('sentry', 'traces_sample_rate', fallback=0.0),
) )
if INSTANCE_NAME:
sentry_sdk.set_tag('instance', INSTANCE_NAME)
# Build paths inside the project like this: BASE_DIR / 'something' # Build paths inside the project like this: BASE_DIR / 'something'
PROJECT_DIR = Path(__file__).resolve().parent PROJECT_DIR = Path(__file__).resolve().parent