SAP Kyma is a powerful open-source platform that extends SAP Business Technology Platform by enabling cloud-native application development and integration through Kubernetes. While Kyma simplifies the deployment and management of microservices and event-driven applications, troubleshooting issues in distributed systems remains a critical challenge.
Effective troubleshooting in Kyma requires deep insights into application behavior, performance, and failures. This is where logs and traces become invaluable tools, offering observability that empowers developers and operators to quickly identify root causes and resolve issues.
This article explores best practices and techniques for troubleshooting Kyma applications using logs and distributed tracing, highlighting how these observability components can accelerate incident response and improve application reliability.
Logs are time-stamped, structured or unstructured text records generated by applications and infrastructure components. They provide detailed context about events, errors, warnings, and system states.
In Kyma, logs typically originate from:
Logs help pinpoint what happened, when, and where.
Distributed tracing captures the end-to-end flow of requests as they propagate through various microservices and components. A trace consists of multiple spans, each representing a segment of work, allowing you to:
Tracing answers how requests flow and where delays or failures occur.
Kyma natively integrates with Kubernetes logging mechanisms and supports popular observability stacks such as EFK (Elasticsearch, Fluentd, Kibana) or Loki/Promtail for log aggregation and analysis.
You can view logs for Kyma application pods via:
kubectl logs <pod-name> -n <namespace>
For multi-container pods or specific containers:
kubectl logs <pod-name> -c <container-name> -n <namespace>
Kyma runtime typically includes a logging backend where logs are aggregated and indexed, enabling powerful querying through dashboards. Accessing these logs via Kibana or Grafana Loki provides:
Kyma supports distributed tracing via integration with OpenTelemetry and tools such as Jaeger or Zipkin.
In Kyma, traces can be accessed through the tracing dashboard (Jaeger UI):
Identify the Problem
Use alerting systems or user reports to detect abnormal behavior.
Gather Logs
Check application and Kyma component logs to find error messages, warnings, or anomalies.
Correlate with Traces
Use trace IDs from logs to locate corresponding distributed traces and visualize request flows.
Analyze Latency and Errors
Pinpoint where delays or failures occur in the service mesh or event pipeline.
Drill Down
Investigate problematic code or configurations based on log details and trace data.
Fix and Validate
Apply fixes and monitor logs and traces to ensure resolution.
Troubleshooting Kyma applications demands robust observability capabilities. By leveraging centralized logging and distributed tracing, developers and operators gain comprehensive visibility into complex, distributed SAP Kyma environments.
Properly implemented logs and traces not only expedite root cause analysis but also empower teams to proactively improve application stability and performance—key for successful SAP extensions and cloud-native innovation.