aerospike / aerospike-client-csharp

Aerospike C# Client Library
70 stars 48 forks source link

Add tracing #79

Open ogxd opened 1 year ago

ogxd commented 1 year ago

Context

Tracing is a very powerful concept for modern backends and found its way as a basic of observability as logs and metrics are today.

In dotnet, distributed tracing was pushed forward in .NET 6 with the introduction of the System.Diagnostics.Activity APIs in the base class library. See this article and the official documentation.

Instrumentation was progressively introduced for the most common protocols over the last two years, starting with the HttpClient and following with Grpc.Net.Client (see some example from the source code).
Given the critical place Aerospike spike has in many backends, it would be more than welcome for this client to implement the Activity APIs.

How

The Activity API is quite barebone and gives a lot of freedom as to how to use them. OpenTelemetry (part of the CNCF) proposes some naming conventions, which are already widely adopted by the industry (Grpc.Net.Client uses them).

ogxd commented 1 year ago

See PR #80

shannonklaus commented 1 year ago

We like this idea. We will put it in our next release, pending our testing of it

ogxd commented 1 year ago

Awesome!
Here is an example of what it looks like with the PR (we have been testing this fork on our end).

image

This UI is from Grafana Tempo but it would be similar in all other solutions for visualizing traces that support the OpenTelemetry semantic conventions (Datadog APM, Jaeger, LightStep, Zipkin, ...)

guillaumed-unity commented 1 year ago

That's pretty cool, any plan to include this ? @shannonklaus ?

shannonklaus commented 1 year ago

Yes, I am still planning on including this at some point, it has been out prioritized by other features, but it is still on my radar