sentry_configs.py 517 B

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