1

I've recently been reading up on the topic of distributed tracing in asp.net core. I'm using asp.net core 5 and can see that it is automatically creating tracing information that is compatible with W3C context tracing. I plan to use this information to help improve my standard logging, however, I'm also wondering what my options are for recording this tracing information to be used in a visualizer.

I'm guessing Application Insights seamlessly integrates with this (correct me if that's wrong), but what options do I have other than AI? I am generally using AWS services for everything as my client is in the AWS cloud but it looks like the .net core libraries for AWS X-Ray roll their own trace data and won't send the tracing information .net is already capturing, which is kind of annoying.

What other places besides AI can I send this tracing information to view it? Or is it possible to do this with AWS X-Ray and I'm just not finding the answer as to how that's accomplished?

omatase
  • 1,551
  • 1
  • 18
  • 42
  • With Application Insights you potentially can implement you own TelemetrySink and send telemetry where ever you like (it still will autocapture everything for you, propagate W3C distributed tracing context, etc.). And prevent sending it to AI backends. Are you looking for a solution like this? – ZakiMa Jul 15 '21 at 05:27
  • That could work, yeah. I'm not sure how logging and sinks tie into trace capturing though. I realize it's just two types of logging but the logs are read by very different tools. I know in the AWS world those two types of logs go to completely different places (CloudWatch and X-Ray) – omatase Jul 15 '21 at 12:51

1 Answers1

1

I think I found the perfect answer to this. Re-reading the OpenTelemetry documentation it looks like it is made to integrate seamlessly with the asp.net core Activities functionality present in .net core > 3.

From https://opentelemetry.io/docs/net/getting-started/

OpenTelemetry for .NET is unique among OpenTelemetry implementations, as it is integrated with the .NET System.Diagnostics library. At a high level, you can think of OpenTelemetry for .NET as a bridge between the telemetry available through System.Diagnostics and the greater OpenTelemetry ecosystem, such as OpenTelemetry Protocol (OTLP) and the OpenTelemetry Collector.

This gives me the ability to export to a lot of different tracing providers like Jaeger and Zipkin, but poking around in the NuGet packages for OpenTelemetry I also noticed that it has an AWS X-Ray Exporter, which is awesome if it works well.

omatase
  • 1,551
  • 1
  • 18
  • 42