All Projects → karlospn → opentelemetry-tracing-demo

karlospn / opentelemetry-tracing-demo

Licence: other
Example about how to use OpenTelemetry for tracing when we have a series of distributed applications communicating between them

Programming Languages

C#
18002 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to opentelemetry-tracing-demo

opentelemetry-dotnet-contrib
This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
Stars: ✭ 124 (+359.26%)
Mutual labels:  opentelemetry
pulsar-tracing
Tracing instrumentation for Apache Pulsar clients.
Stars: ✭ 13 (-51.85%)
Mutual labels:  opentelemetry
aws-otel-lambda
AWS Distro for OpenTelemetry - AWS Lambda
Stars: ✭ 94 (+248.15%)
Mutual labels:  opentelemetry
splunk-otel-java
Splunk Distribution of OpenTelemetry Java
Stars: ✭ 39 (+44.44%)
Mutual labels:  opentelemetry
hubble-otel
Hubble adaptor for OpenTelemetry
Stars: ✭ 29 (+7.41%)
Mutual labels:  opentelemetry
Discovery
☀️ Nepxion Discovery is a solution for Spring Cloud with blue green, gray, route, limitation, circuit breaker, degrade, isolation, tracing, dye, failover 蓝绿、灰度、路由、限流、熔断、降级、隔离、追踪、流量染色、故障转移
Stars: ✭ 4,658 (+17151.85%)
Mutual labels:  opentelemetry
geometrics
An opinionated library and set of guides for adding application tracing and metrics to a Phoenix application
Stars: ✭ 17 (-37.04%)
Mutual labels:  opentelemetry
FastAPI-template
Feature rich robust FastAPI template.
Stars: ✭ 660 (+2344.44%)
Mutual labels:  opentelemetry
otel-launcher-node
Launcher, a Lightstep Distro for OpenTelemetry Node.js 🚀
Stars: ✭ 20 (-25.93%)
Mutual labels:  opentelemetry
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (+10111.11%)
Mutual labels:  opentelemetry
splunk-otel-js-web
Splunk distribution of Open Telemetry for browser environment.
Stars: ✭ 23 (-14.81%)
Mutual labels:  opentelemetry
workit
Extensible worker for Node.js that works with both Zeebe and Camunda BPM platforms powered by TypeScript
Stars: ✭ 51 (+88.89%)
Mutual labels:  opentelemetry
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+23977.78%)
Mutual labels:  opentelemetry
gateway
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (+248.15%)
Mutual labels:  opentelemetry
aws-o11y-recipes
recipes for observability solutions at AWS
Stars: ✭ 110 (+307.41%)
Mutual labels:  opentelemetry
opentelemetry-application-insights
OpenTelemetry exporter for Azure Application Insights
Stars: ✭ 17 (-37.04%)
Mutual labels:  opentelemetry
opentelemetry-swift
OpenTelemetry Tracer built for Swift Distributed Tracing
Stars: ✭ 22 (-18.52%)
Mutual labels:  opentelemetry
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+1518.52%)
Mutual labels:  opentelemetry
opentelemetry-erlang-api
Erlang/Elixir OpenTelemetry API
Stars: ✭ 61 (+125.93%)
Mutual labels:  opentelemetry
Opentelemetry Specification
Specifications for OpenTelemetry
Stars: ✭ 2,242 (+8203.7%)
Mutual labels:  opentelemetry

Introduction

This repository contains an example about how to use opentelemetry for tracing when we have a bunch of distributed applications

Content

The repository contains the following applications:

Alt Text

  • App1.WebApi is a NET6 Web API with 2 endpoints.

    • The /http endpoint makes an HTTP request to the App2 "/dummy" endpoint.
    • The /publish-message endpoint queues a message into a Rabbit queue named "sample".
  • App2.RabbitConsumer.Console is a NET6 console application.

    • Dequeues messages from the Rabbit "sample" queue and makes a HTTP request to the App3 "/sql-to-event" endpoint with the content of the message.
  • App3.WebApi is a NET6 Web API with 2 endpoints

    • The /dummy endpoint returns a fixed "Ok" response.
    • The /sql-to-event endpoint receives a message via HTTP POST, stores it in a MSSQL Server and afterwards publishes the message as an event into a RabbitMq queue named "sample_2".
  • App4.RabbitConsumer.HostedService is a NET6 Worker Service.

    • A Hosted Service reads the messages from the Rabbitmq "sample_2" queue and stores it into a Redis cache database.

OpenTelemetry .NET Client

The apps are using the following package versions:

<PackageReference Include="OpenTelemetry" Version="1.2.0-rc1" />
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.2.0-rc1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc8" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc8" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc8" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.0.0-rc8" />
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc8" />

External Dependencies

  • Jaeger
  • MSSQL Server
  • RabbitMq
  • Redis Cache

How to run the apps

The repository contains a docker-compose file that starts up the 4 apps and also the external dependencies.
There is a little caveat in the docker-compose:

  • You can control the order of service startup and shutdown with the depends_on option. However, for startup Compose does not wait until a container is “ready” only until it’s running.
    That's a problem because both App3 and App4 need to wait for the rabbitMq container to be ready. To avoid this problem the docker-compose is overwriting the "entrypoint" for both apps and executing a shell script that makes both apps sleep 30 seconds before starting up.

If you don't want to use the compose file you can use docker to start the dependencies manually, you can ran the following commands:

  • docker run -d --name jaeger -e COLLECTOR_ZIPKIN_HTTP_PORT=19411 -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 19411:19411 jaegertracing/all-in-one
  • docker run -d --hostname my-rabbit --name some-rabbit -p 8082:15672 -p 5672:5672 rabbitmq:3.6.15-management
  • docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pass@Word1" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  • docker run -d --name some-redis -p "6379:6379" redis:6.2.1

Output

If you open jaeger you are going to see something like this

Alt Text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].