Introducing Observability for Polyglot Applications
- Nilushan Costa
- Senior Software Engineer - WSO2
With the recently introduced Build and Deploy Your Dockerfile feature, users can now create awesome digital experiences quickly, easily, and securely using any programming language they prefer. Once they develop their application and containerize it, Choreo will take care of the rest by building and deploying it to Kubernetes in minutes.
Irrespective of the language used to write applications, the ability to observe them is vital. While it’s possible to instrument applications and add observability capabilities, this takes time and requires domain expertise. With Choreo, users don’t need to set up language-specific agents or expose metrics using additional libraries, and they can leverage the platform’s observability capabilities without hassle.
Until now, Choreo provided observability only for components written using Ballerina. We’re happy to announce that it now provides the ability to observe components written in any language.
Observing Polyglot Components
To view the information that is available for observing polyglot components, you first need to create a component with the Dockerfile build present and deploy it in Choreo. Refer to Figures 1 and 2 to see how this can be done.
Figure 1: Menu to create a REST API
Figure 2: Deploy view
After you send requests to the component, Choreo will show you observability data. You’ll be able to use several metrics to observe the component as shown in Figure 3. The throughput graph shows the processing rate of requests, while the latency graph shows the mean latency as well as 50th, 90th, and the 99th latency percentiles.
Figure 3: Choreo observability view: application performance and logs
The diagnostics view (as shown in Figure 4) makes it possible to correlate all metrics: error rate, throughput, latency, CPU usage, and memory usage. This correlation is useful for debugging issues in components. For example, a very high CPU usage could be the reason why the component is having a high request latency.
Figure 4: Diagnostic view of Choreo observability
In addition, Choreo also shows you logs from your containers as shown in Figure 5.
Figure 5: Logs view in Choreo observability
How Does Choreo Do That?
Since Choreo doesn’t restrict the programming languages you can use, it would mean the platform would have to instrument a variety of them. This would have been complex. To solve this problem, Choreo uses extended Berkeley Packet Filter (eBPF)  to collect data about how your components are performing. eBPF makes it possible to run sandboxed programs at the Linux Kernel level without having to modify the Kernel or load additional Kernel modules. This makes it possible to use eBPF for many interesting use-cases like observability. It is this eBPF-based data collection capability that allows Choreo to gather observability data without language specific instrumentation.
Choreo uses Pixie to collect data on non-Ballerina components. Pixie is an open-source Kubernetes observability platform that uses eBPF along with other machine-level metrics to provide observability.
Choreo uses these metrics along with logs to provide a feature-rich observability view that users can use to gain valuable insights about how their components are running in Choreo.
In Choreo, when you work with components, you can use the component-level observability view as explained above to gain insights about a single component. A Choreo project is typically made up of several related components. Therefore, it is equally important to observe how different components interact. To make this possible, we will soon unveil new features to make project-level observability possible.
In addition to providing deep observability for Ballerina components, we’ve expanded Choreo’s observability capabilities to non-Ballerina components as well. Developers now have the freedom to create components using their language of choice while being able to observe them without having to do any manual instrumentation.
Visit Choreo to sign up for an account and see how you can create awesome digital experiences quickly, easily, and securely.
 - https://ebpf.io/