sentry_config.py 560 B

123456789101112131415161718192021222324
  1. from typing import Optional
  2. from pydantic import Field, NonNegativeFloat
  3. from pydantic_settings import BaseSettings
  4. class SentryConfig(BaseSettings):
  5. """
  6. Sentry configs
  7. """
  8. SENTRY_DSN: Optional[str] = Field(
  9. description='Sentry DSN',
  10. default=None,
  11. )
  12. SENTRY_TRACES_SAMPLE_RATE: NonNegativeFloat = Field(
  13. description='Sentry trace sample rate',
  14. default=1.0,
  15. )
  16. SENTRY_PROFILES_SAMPLE_RATE: NonNegativeFloat = Field(
  17. description='Sentry profiles sample rate',
  18. default=1.0,
  19. )