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
|
|
|
"""
|
2024-09-22 13:38:41 +08:00
|
|
|
Configuration settings for Sentry error tracking and performance monitoring
|
2024-06-19 13:41:12 +08:00
|
|
|
"""
|
2024-08-23 23:46:01 +08:00
|
|
|
|
2024-06-19 13:41:12 +08:00
|
|
|
SENTRY_DSN: Optional[str] = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="Sentry Data Source Name (DSN)."
|
|
|
|
" This is the unique identifier of your Sentry project, used to send events to the correct project.",
|
2024-06-19 13:41:12 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
2024-06-20 11:28:52 +08:00
|
|
|
SENTRY_TRACES_SAMPLE_RATE: NonNegativeFloat = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="Sample rate for Sentry performance monitoring traces."
|
|
|
|
" Value between 0.0 and 1.0, where 1.0 means 100% of traces are sent to Sentry.",
|
2024-06-19 13:41:12 +08:00
|
|
|
default=1.0,
|
|
|
|
)
|
|
|
|
|
2024-06-20 11:28:52 +08:00
|
|
|
SENTRY_PROFILES_SAMPLE_RATE: NonNegativeFloat = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="Sample rate for Sentry profiling."
|
|
|
|
" Value between 0.0 and 1.0, where 1.0 means 100% of profiles are sent to Sentry.",
|
2024-06-19 13:41:12 +08:00
|
|
|
default=1.0,
|
|
|
|
)
|