Getting Started with Observability in Nais¶
This tutorial will guide you through the process of enabling observability for your application on Nais, using OpenTelemetry and the Grafana stack (Loki, Tempo, Prometheus, Grafana).
Prerequisites¶
- A Nais application deployed to a cluster
- Access to your team's Grafana instance
1. Enable Auto-Instrumentation¶
The easiest way to get started is to enable auto-instrumentation in your nais.yaml:
Deploy your application with this configuration. Nais will automatically inject OpenTelemetry agents for supported languages.
2. View Metrics in Grafana¶
Once your app is running, metrics will be available in Prometheus and visualized in Grafana.
- Go to your Grafana dashboard
- Use the Prometheus data source to query your application's metrics
- Explore default dashboards or create your own
3. View Logs in Grafana Loki and Team Logs¶
- Logs sent to
stdout/stderrare automatically collected by Loki - For private logs, configure Team Logs
- In Grafana, use the Loki or Team Logs data source to search and analyze logs
4. View Traces in Grafana Tempo¶
- Traces are collected via OpenTelemetry and sent to Tempo
- In Grafana, use the Tempo data source to view traces for your application
- You can correlate traces with logs and metrics for full observability
Next Steps¶
Congratulations! You now have end-to-end observability for your Nais application.