Observability
Lexia's Observability layer provides complete visibility into system health, performance, and reliability — enabling proactive monitoring, alerting, and long-term stability of your agents.
Image: Diagram showing Observability at the base of Lexia's Safety stack connected to Logs, Alerts, and Metrics
1. Overview
The Observability Layer extends Tracing and Insights with infrastructure-level monitoring.
It integrates runtime logs, metrics, and alerts to give teams real-time visibility over every component — agents, databases, and microservices.
You can connect Lexia with tools like:
- Better Stack — logging and uptime monitoring
- Wazuh — security and anomaly detection
- Grafana / Prometheus — advanced visualization
2. Logs & Metrics
Lexia captures structured logs from every agent and service:
- Request latency
- Function call duration
- Memory and CPU usage
- Guardrail and error events
Example log record:
{
"timestamp": "2025-10-18T13:25:41Z",
"service": "lexia-agent-core",
"level": "info",
"message": "Agent responded successfully",
"duration_ms": 1650
}
Logs are streamed to Lexia's centralized collector and can be queried via:
lexia logs tail --service agent-core
Image: Dashboard visualization of logs and metrics aggregated by agent and environment
3. Alerts & Thresholds
Set performance or safety thresholds to trigger real-time alerts.
Example configuration:
alerts:
- name: "High Error Rate"
condition: "error_rate > 5%"
action: "email"
- name: "Slow Response"
condition: "avg_latency > 3000ms"
action: "slack"
Alerts can be routed to:
- Slack / Teams
- PagerDuty
- Better Stack Alerts
Image: Flow diagram showing alert triggers from Lexia → Slack + Email notifications
4. System Health Dashboard
The Lexia Dashboard → Safety → Observability section shows:
- Uptime percentage
- API and DB latency
- CPU and memory usage
- Guardrail and error incident graphs
Each metric links back to corresponding Tracing data for root cause analysis.
Image: Screenshot mockup of Lexia Observability dashboard with charts and alerts summary
5. Integrations (Better Stack, Wazuh)
You can extend observability through external providers.
a. Better Stack
- Real-time log streaming
- Custom dashboards
- Uptime monitoring
Integration:
lexia observability connect betterstack --api-key <API_KEY>
b. Wazuh
- Security event correlation
- File integrity monitoring
- Threat detection
Integration:
lexia observability connect wazuh --endpoint https://wazuh.mycompany.com
c. Prometheus / Grafana
- Custom visualization
- Query via /metrics endpoint
Image: Diagram showing Lexia sending logs and metrics to external tools (Better Stack, Wazuh, Grafana)
6. Retention Policies
Lexia keeps logs and metrics based on workspace tier:
| Tier | Retention Period | Export Support |
|---|---|---|
| Starter | 7 days | Manual |
| Pro | 30 days | Scheduled exports |
| Enterprise | 90+ days | API streaming |
Export via CLI:
lexia logs export --since 30d
7. Security & Compliance
- All logs transmitted via TLS
- Logs encrypted at rest (AES-256)
- Access restricted by workspace roles
- Audit logs immutable for compliance