Observability
This section covers implementing observability for applications on the Ybor Platform. Whether you're building new applications or migrating existing ones, your services need to emit logs, metrics, traces, and health signals in a way that integrates with the platform's monitoring infrastructure.
The Observability Model
Applications on the Ybor Platform implement four observability pillars:
| Pillar | Purpose | Key Question | Collection |
|---|---|---|---|
| Logging | Discrete events and state changes | "What happened?" | stdout/stderr → Datadog/Loki |
| Metrics | Numerical measurements over time | "How is it performing?" | /metrics → Prometheus |
| Tracing | Request flow across services | "Where did time go?" | OTLP → Tempo/Jaeger |
| Health Checks | Current operational status | "Is it working?" | HTTP probes → Kubernetes |
These four pillars work together:
- Logs tell you what happened
- Metrics tell you how much and how fast
- Traces tell you where time was spent across services
- Health checks tell you if the system is operational
Platform Integration
The Ybor Platform automatically collects observability data from your applications. As a developer, you configure your application to emit data using standard interfaces; the platform handles collection, storage, and visualization.
| Data Type | Your Responsibility | Platform Handles |
|---|---|---|
| Logs | Write JSON to stdout/stderr | Capture, ship to Datadog/Loki |
| Metrics | Expose /metrics endpoint | Scrape, store in Prometheus |
| Traces | Export via OTLP | Collect, store in Tempo/Jaeger |
| Health | Implement probe endpoints | Configure Kubernetes probes |
Standard Endpoints
All Ybor Platform services should expose these endpoints:
| Endpoint | Purpose | Response |
|---|---|---|
/health | Comprehensive health check | JSON with component status |
/health/live | Kubernetes liveness probe | 200 OK if process alive |
/health/ready | Kubernetes readiness probe | 200 OK if ready for traffic |
/metrics | Prometheus metrics | Prometheus text format |
Prerequisites
Before implementing observability, ensure you have:
- A deployed application on the platform (see Deployments)
- Understanding of your application's key operations and dependencies
- Access to your observability platform (Datadog, Grafana, etc.)
In This Section
- Logging — Structured JSON logging to stdout/stderr
- Metrics — Prometheus metrics types, naming, and exposition
- Tracing — Distributed tracing with OpenTelemetry
- Health Checks — Kubernetes liveness and readiness probes
- Languages — Language-specific implementation guides
Getting Started
We recommend implementing observability in this order:
- Start with health checks — Required for reliable Kubernetes deployments
- Add logging — Essential for debugging; ensure JSON format to stdout
- Expose metrics — Add a
/metricsendpoint with Prometheus format - Enable tracing — Instrument your application with OpenTelemetry
Each pillar builds on the previous one. Health checks are essential for deployment; logging is essential for debugging; metrics enable monitoring and alerting; tracing provides deep visibility into distributed systems.
For a guided migration path, see Migrating Legacy Applications — Observability.