dify/api/configs/extra/sentry_configs.py
Bowen Liang 3cc6093e4b
feat: introduce pydantic-settings for config definition and validation (#5202)
Co-authored-by: -LAN- <laipz8200@outlook.com>
2024-06-19 13:41:12 +08:00

24 lines
517 B
Python

from typing import Optional
from pydantic import BaseModel, Field, PositiveFloat
class SentryConfigs(BaseModel):
"""
Sentry configs
"""
SENTRY_DSN: Optional[str] = Field(
description='Sentry DSN',
default=None,
)
SENTRY_TRACES_SAMPLE_RATE: PositiveFloat = Field(
description='Sentry trace sample rate',
default=1.0,
)
SENTRY_PROFILES_SAMPLE_RATE: PositiveFloat = Field(
description='Sentry profiles sample rate',
default=1.0,
)