praval.observability.config
Compatibility imports for the typed Praval configuration system.
Functions
Return the v0.8.2-compatible cached observability configuration. |
|
Reset legacy configuration state for test isolation. |
- class praval.observability.config.ObservabilityConfig(**data)[source]
Bases:
_ConfigModelObservability signal and privacy configuration.
The deprecated
sample_rate,otlp_endpoint, andstorage_pathinputs remain accepted for the v0.8.2 migration window.- Parameters:
enabled (bool)
capture_content (bool)
content_allowlist (tuple[str, ...])
sampling (Literal['always_on', 'always_off', 'parentbased_traceidratio'])
sample_ratio (float)
flush_timeout_millis (int)
otlp (OTLPConfig)
local (LocalObservabilityConfig)
- enabled: bool
- capture_content: bool
- content_allowlist: tuple[str, ...]
- sampling: Literal['always_on', 'always_off', 'parentbased_traceidratio']
- sample_ratio: float
- flush_timeout_millis: int
- otlp: OTLPConfig
- local: LocalObservabilityConfig
- classmethod map_legacy_fields(value)[source]
Map supported v0.8.2 field names to the typed nested schema.
- Return type:
Any- Parameters:
value (Any)
- property sample_rate: float
Return the deprecated sampling field.
- property otlp_endpoint: str | None
Return the deprecated flat OTLP endpoint.
- property storage_path: str
Return the deprecated expanded local path.
- classmethod from_env()[source]
Load supported legacy observability environment variables.
- Return type:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].