EventSourcing.Backbone Observability with Open Telemetry

Bnaya Eshet
5 min readJun 26, 2023

--

Introduction:

Welcome back to our EventSourcing.Backbone blog series! In this installment, we’re diving deep into the realm of observability by harnessing the power of OpenTelemetry. Building upon our previous posts on EventSourcing.Backbone, we’ll explore how integrating OpenTelemetry takes your event-driven architectures to the next level. Plus, we have an exciting treat for you — a ready-to-use template that includes Docker Compose for setting up Redis, Prometheus, Jaeger, and Grafana, all coupled with built-in OpenTelemetry support. Let’s unlock the true potential of observability together!

Introduction to OpenTelemetry:

Unleashing Observability Superpowers

In the realm of modern software development, understanding the behavior and performance of applications is paramount. This is where OpenTelemetry comes into play. OpenTelemetry is an open-source observability framework that empowers developers to gain deep insights into their systems through distributed tracing, metrics, and logging. With its flexible and vendor-agnostic nature, OpenTelemetry makes observability more accessible, making it easier to identify and troubleshoot issues, optimize performance, and improve overall system reliability. In this blog post, we’ll take a closer look at the power of OpenTelemetry and how it can unlock observability superpowers for your applications. Let’s embark on this exciting journey together!

The Challenge of Observing Event-Based Systems

Observing event-based systems is challenging due to the asynchronous and decoupled nature of events. Tracing the logical sequence of events and understanding their causality is particularly difficult.

Proper observability tools and techniques are essential for addressing these challenges. Distributed tracing and causality tracking help visualize event flows and dependencies, enabling troubleshooting and optimization.

Investing in specialized observability solutions for event-based architectures is crucial for gaining insights into event causality and flow. This enables efficient troubleshooting and optimization, ensuring the reliability and scalability of event-driven systems.

The Three Pillars of OpenTelemetry

OpenTelemetry encompasses three pillars: logging, metrics, and tracing.

  1. Logging: is a fundamental pillar of observability, but it alone doesn’t provide a holistic view of the system. While logging captures important events and messages, it doesn’t give a broader picture of the system’s behavior and performance. However, it remains a valuable tool for capturing specific information and debugging individual components.
  2. Metrics: play a vital role in understanding the overall health and performance of your applications. By collecting, aggregating, and analyzing metrics such as response times, error rates, and resource utilization, you gain valuable insights into system behavior. Metrics help identify bottlenecks, detect anomalies, and make data-driven decisions for optimization and scalability by providing a consolidated view of performance across various components and services.
  3. Tracing: is a powerful mechanism for tracking a specific sequence of events and understanding communication patterns in distributed systems. With distributed tracing, you can visualize the flow of events across multiple services and components, identify latency issues, and troubleshoot performance problems.

Tools like Jaeger, Zipkin for may use for tracing data.
Other tools like Grafana, Aspecto, New Relic, Honeycomb, and others, will provide a border view of Tracing, Metrics & Logs.

EventSourcing.Backbone Setup ❤ OpenTelemetry

As a modern platform, EventSourcing.Backbone offers built-in support for OpenTelemetry. With just three simple command lines, you can have a fully operational event-sourcing service along with Jaeger and Grafana. Give it a try!

To get started, follow these steps:

  1. Install or update the template:
dotnet new install Event-Sourcing.Backbone.Templates

2. Create a .NET solution with an event sourcing kick-start sample:

# Customize the capitalized placeholders and make it your own
dotnet new evtsrc -uri NAME_OF_REDIS_KEY -n SOLUTION_NAME -e EVENT_NAME

3. Setup Environment Variable

Set the Environment Variable of the REDIS end-point and password (by default it looks for, the password is optional):

  • REDIS_EVENT_SOURCE_ENDPOINT
  • REDIS_EVENT_SOURCE_PASS

4. Spin up the Docker orchestration of Redis, Prometheus, Grafana, and Jaeger, along with a sample Grafana dashboard:

# Assuming you have Docker Desktop installed
# navigate to the solution folder

cd ./dockers/compose
docker compose up -d

# To stop the services, use `docker compose down`

By following these steps, you’ll have a complete event-sourcing solution up and running, integrated with OpenTelemetry for enhanced observability. Enjoy exploring the power of EventSourcing.Backbone and visualizing the system behavior with Jaeger and Grafana!

  • Run the application (F5)

Credentials sets in the `compose.yaml` file
Defaults are,
- user: admin
- password: grafana

# Goto the Event Sourcing dashboard

Summary

In this post, we learned about the importance of observability in event sourcing and explore OpenTelemetry’s pillars: logging, metrics, and tracing. With seamless integration, EventSourcing.Backbone simplifies setup. Experience the synergy of EventSourcing.Backbone and OpenTelemetry for advanced event-driven system analysis.

Check Awsome Open Telemetry for more resources on Open Telemetry.

Next

This post is the first of a series about event sourcing and an exciting framework called EventSourcing.Backbone. Enter the series to learn more.

--

--