News New Look, Same Vision: KrakenD’s Website Redesign

From OpenCensus to OpenTelemetry

by Albert Lombarte

In deployments of complex, distributed, and cloud-native environments, understanding the intricacies of application behavior and performance is crucial, and this is why KrakenD integrated advanced telemetry six years ago through OpenCensus and native metrics.

With the release of KrakenD v2.6, we have created an integration for OpenTelemetry and marks a significant evolution in its observability capabilities, providing users with enhanced insights and diagnostics tools.

What are the benefits of the OTEL integration

OpenTelemetry represents a pivotal shift in how telemetry data is collected and managed. Compared to its predecessor, OpenCensus, we can continue onboarding new vendors without developing new exporters. Because OpenTelemetry uses the unified open protocol OTLP, any vendor offering a collector that implements it is automatically compatible with KrakenD without requiring us to release new code.

Aside from the obvious benefit of having more options to push telemetry data out, OTEL’s support for auto-instrumentation and integration with cloud-native deployments simplifies monitoring dynamic environments, making it an invaluable asset for developers and operations teams. It will save you a lot of time setting up new environments.

In addition, this integration allows you to have multiple exporters even when they are of the same type, facilitating transitions from one telemetry system to another. For instance, say you have a self-hosted Grafana and want to migrate to the cloud version while simultaneously seeing metrics reported in both places. Our exporters allow you to do that.

Finally, this integration brings a level of granularity that gives you control of what data you want to push, and we have split the request-response flow into three different layers you can configure (global, proxy, backend).

Transitioning from OpenCensus to OpenTelemetry

KrakenD has a longstanding history of leveraging OpenCensus for telemetry. However, in alignment with the evolving technological landscape, we are transitioning to OpenTelemetry for its modern, robust capabilities. While OpenCensus integration remains functional, it will no longer receive updates.

As we embrace OpenTelemetry, an emerging technology, it’s important to note that its components may have mixed stability statuses, yet KrakenD is committed to ensuring compatibility between versions.

It is up to you to add an additional OpenTelemetry exporter while you keep your existing OpenCensus or just replace it. From KrakenD, we do not force you to do any migration yet, and the two components are fully functional.

If you used InfluxDB with our Grafana Dashboard, we have added a new Dashboard that can use scrapped data from Prometheus, a long-awaited feature.

If you used other OpenCensus exporters, you’ll find a migration section for each in their documentation.

Some insights on how OpenTelemetry works

The integration of OpenTelemetry within KrakenD enables the collection of telemetry data across enabled layers, offering two modes of publishing metrics:

  • OpenTelemetry protocol (OTLP) for pushing metrics to collectors or SaaS solutions. This opens the doors to multiple vendors. KrakenD pushing data using OTLP
  • Prometheus for exposing metrics through a /metrics endpoint, allowing external Prometheus jobs to pull data. Prometheus scrapping from KrakenD

This flexibility ensures that KrakenD can adapt to diverse monitoring setups, enhancing its observability capabilities.

Configuring OpenTelemetry within KrakenD is straightforward yet extensive. Users can define their preferences for data reporting through the telemetry/opentelemetry namespace and the granularity of data collected across different application layers. Something obvious you will find is the number of configuration options you have with our OTEL integration.

Conclusion

The integration of OpenTelemetry into KrakenD is more than just a technical update; it’s a transformational change that elevates the observability and diagnostic capabilities of KrakenD to new heights. By providing detailed, granular, contextual insights into application performance and behavior, KrakenD users can now navigate the complexities of modern, distributed architectures with greater confidence and efficiency.

As we move forward, KrakenD remains dedicated to adopting and supporting leading-edge technologies like OpenTelemetry, ensuring our community can access the best tools for managing their applications.

We hope you enjoy the new feature!

Scarf

Stay up to date with KrakenD releases and important updates