2024-06-19 13:41:12 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
from pydantic import Field, NonNegativeFloat
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-06-19 13:41:12 +08:00
|
|
|
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
class SentryConfig(BaseSettings):
|
2024-06-19 13:41:12 +08:00
|
|
|
"""
|
|
|
|
Sentry configs
|
|
|
|
"""
|
|
|
|
SENTRY_DSN: Optional[str] = Field(
|
|
|
|
description='Sentry DSN',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
2024-06-20 11:28:52 +08:00
|
|
|
SENTRY_TRACES_SAMPLE_RATE: NonNegativeFloat = Field(
|
2024-06-19 13:41:12 +08:00
|
|
|
description='Sentry trace sample rate',
|
|
|
|
default=1.0,
|
|
|
|
)
|
|
|
|
|
2024-06-20 11:28:52 +08:00
|
|
|
SENTRY_PROFILES_SAMPLE_RATE: NonNegativeFloat = Field(
|
2024-06-19 13:41:12 +08:00
|
|
|
description='Sentry profiles sample rate',
|
|
|
|
default=1.0,
|
|
|
|
)
|