Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/odeyabdulrahman/distributed.tracing

Distributed tracing is a technique used to monitor and troubleshoot complex distributed systems by following the path of requests as they travel through multiple services.
https://github.com/odeyabdulrahman/distributed.tracing

distributed distributed-systems distributed-tracing microservices monitoring netcore open-telemetry opentracing tracing zipkin

Last synced: 8 days ago
JSON representation

Distributed tracing is a technique used to monitor and troubleshoot complex distributed systems by following the path of requests as they travel through multiple services.

Awesome Lists containing this project

README

        

# Distributed.Tracing with Opentelemetry and Openzipkin

![Logo](https://i.postimg.cc/L5LxVjkV/distributed-tracing-icon.png)

Distributed tracing is a method for tracking requests as they flow through a complex system made up of multiple servers and services. It enables developers to understand the behavior of their distributed systems by providing visibility into the path of a request as it traverses different components of the system.

## How to use:
After adding the library to our project, we have to follow the following steps:

1 - We will add some lines to Program.cs
```javascript

using Distributed.Tracing.Extensions;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedTracingServies(builder.Configuration);
var app = builder.Build();
app.UseHttpsRedirection();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
StartDiagnosticExtension.StartActivity("App-Service1", "StartEndPoint", "Service1 is stated !!");
endpoints.MapControllers();
});
app.Run();
```
2 - add Elastic URL in appseting.json .
```javascript
{
"OpenTelemetryConfig": {
"ListenerName": "Service1",
"ServiceName": "Service1.API",
"ServiceVersion": "1.0.0"
},
"ZipkinConfig": {
"ZipkinAddress": "http://localhost:9411/api/v2/spans"
},
}
```
## Result in zipkin:

![Logo](https://i.postimg.cc/zfj8dH52/Screenshot-1.png)

## Result in zipkin / dependency
![Logo](https://i.postimg.cc/HnjY8YqZ/Screenshot-2.png)