Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 2 KB

File metadata and controls

61 lines (44 loc) · 2 KB

OpenTelemetry Example Application

This set of projects is an example distributed application comprised of two components:

  1. An ASP.NET Core Web API
  2. A background Worker Service

The application demonstrates a number of OpenTelemetry concepts:

  • OpenTelemetry APIs for distributed context propagation.
  • Basic conventions of how messaging systems are handled in OpenTelemetry.

The Web API publishes messages to RabbitMQ which the Worker Service consumes. Distributed context propagation is achieved using OpenTelemetry APIs to inject and extract trace context in the headers of the published messages.

The Zipkin exporter is configured for viewing the distributed traces.

Running the example

A running instance of RabbitMQ and Zipkin are required. These can easily be spun up in docker containers.

The WebApi and WorkerService projects can be run from this directory as follows:

dotnet run --project WebApi
dotnet run --project WorkerService

Instead of running the projects individually, if you are using Docker Desktop, a docker-compose file is provided. This makes standing up the Zipkin and RabbitMQ dependencies easy, as well as starting both applications.

To run the example using docker-compose, run the following from this directory:

docker-compose up --build

With everything running:

References