Configuration
Config Key
Section titled “Config Key”The configuration section is ai_observability (loaded from the ai_observability: key in application.yaml).
Options
Section titled “Options”| Key | Type | Default | Env Variable | Description |
|---|---|---|---|---|
enabled | bool | true | ORI_AI_OBSERVABILITY__ENABLED | Master on/off switch for all AI observability |
metrics_enabled | bool | true | ORI_AI_OBSERVABILITY__METRICS_ENABLED | Enable metrics collection (counters, histograms, gauges) |
tracing_enabled | bool | true | ORI_AI_OBSERVABILITY__TRACING_ENABLED | Enable distributed tracing (span creation and export) |
health_checks_enabled | bool | true | ORI_AI_OBSERVABILITY__HEALTH_CHECKS_ENABLED | Enable background health checking for AI components |
trace_redaction_enabled | bool | false | ORI_AI_OBSERVABILITY__TRACE_REDACTION_ENABLED | Redact secret-shaped keys (password, token, api_key, secret, authorization, …) from trace span attributes and audit metadata. Default false — enabling is strongly recommended for production (see Production Warnings). |
trace_max_attribute_length | int | 0 | ORI_AI_OBSERVABILITY__TRACE_MAX_ATTRIBUTE_LENGTH | Cap on string attribute values written to trace spans, in characters (0 = disabled). A sensible value is 4096. Applies whether or not redaction is enabled. |
Example YAML
Section titled “Example YAML”ai_observability: enabled: true metrics_enabled: true tracing_enabled: true health_checks_enabled: true trace_redaction_enabled: true trace_max_attribute_length: 4096Minimal (production-hardened) YAML
Section titled “Minimal (production-hardened) YAML”ai_observability: enabled: true metrics_enabled: true tracing_enabled: true health_checks_enabled: trueEnv Variable Override
Section titled “Env Variable Override”export ORI_AI_OBSERVABILITY__ENABLED=trueexport ORI_AI_OBSERVABILITY__TRACING_ENABLED=trueexport ORI_AI_OBSERVABILITY__METRICS_ENABLED=falseexport ORI_AI_OBSERVABILITY__TRACE_REDACTION_ENABLED=trueexport ORI_AI_OBSERVABILITY__TRACE_MAX_ATTRIBUTE_LENGTH=4096Production Warnings
Section titled “Production Warnings”When Environment.PRODUCTION is detected, the config’s validate_for_environment() method emits warnings if tracing_enabled or metrics_enabled are false — these features are expected in production for operational visibility. It also warns when tracing_enabled is true but trace_redaction_enabled is false: with tracing on, tool arguments, agent actions, and retriever queries are exported to your tracing backend verbatim, and the recommended posture is to enable redaction.
Programmatic
Section titled “Programmatic”from oridecon.ai.observability.config import ObservabilityConfig
config = ObservabilityConfig( enabled=True, metrics_enabled=True, tracing_enabled=False, health_checks_enabled=True,)Config Model
Section titled “Config Model”Loaded as a BaseConfig subclass (ObservabilityConfig) by ObservabilityProvider. The config instance is registered as a container singleton at register() time and can be resolved by other services:
cfg = await container.resolve(ObservabilityConfig)