This article is a mirror article of machine translation, please click here to jump to the original article.

View: 46802|Reply: 4

[.NET Core] ASP.NET Core Link Tracing (4) Access to Jaeger link tracing

[Copy link]
Posted on 1/26/2021 1:17:27 PM | | | |
Before reviewing this article, you need to deploy a Jaeger environment, as follows:

Deploy Jaeger distributed link tracing tutorial with Docker
https://www.itsvse.com/thread-9526-1-1.html
ASP.NET Core Link Tracing (1) Install the Skywalking tutorial
https://www.itsvse.com/thread-9456-1-1.html

ASP.NET Core link tracing (2) uses SkyAPM integration
https://www.itsvse.com/thread-9458-1-1.html

ASP.NET Core Link Tracing (3) SkyAPM is based on Consul dynamic configuration
https://www.itsvse.com/thread-9468-1-1.html



OpenTracing protocol

OpenTracing is a distributed tracking protocol that is independent of platform or language, with a unified interface, which is convenient for the development and access of different distributed tracking systems.Zipkin and Jaeger both follow the OpenTracing protocol


OpenTelemetry OpenTracing OpenCensus information collection and data collection
https://www.itsvse.com/thread-9525-1-1.html


Distributed tracking system Jaeger

Jaeger is a distributed tracking system developed by Uber that is already being used at scale at Uber. And joined the CNCF open source organization on September 13, 2017. Using Jaeger can visualize the call chain of the entire distributed system, which can easily identify and solve problems:

function

  • Information dissemination in a distributed environment
  • Distributed transaction monitoring
  • Demonstrates cross-process call chains
  • Performance optimization
  • Locate the problem



characteristic

  • The advantage of using UDP to transmit data compared to HTTP is that you don't have to worry about Jaeger service downtime or network transmission problems that affect normal business. The disadvantage is packet loss, which affects the entire call chain.
  • The data is serialized via Thrift or protobuf (gRPC transmission), which is the default: Thrift.



Collection strategy

  • ConstSampler, full collection
  • ProbabilisticSampler, probability collection, default to 1 in 10,000
  • RateLimitingSampler is a rate-limiting acquisition that can only collect a certain amount of data per second
  • RemotelyControlledSampler is a dynamic collection strategy that adjusts the collection strategy according to the number of visits to the current system



ASP.NET Core is connected to Jaeger link tracing

The project is a framework for .NET Core 3.1, and Nuget installs the following packages:

Among them, OpenTracing.Contrib.NetCore provides the OpenTracing tool for .NET Core-based applications, which is simply an extension, and the main monitoring is as follows:

  • ASP.NET Core
  • Entity Framework Core
  • System.Net.Http (HttpClient)
  • System.Data.SqlClient
  • Microsoft.Data.SqlClient



In the Startup file the ConfigureServices method is configured as follows:

Calling ITracer on the HomeController controller logs and time-consuming code is as follows:

Launch the website, visit the /Home/Index page, and then view the link through the online Jaeger UI to visit:http://127.0.0.1:16686/, you can search for prime by tags, as shown in the figure below:

http.url=http://localhost:27138/
As shown below:



Source code download:

Tourists, if you want to see the hidden content of this post, pleaseReply


Resources:

The hyperlink login is visible.
The hyperlink login is visible.




Previous:View app status and statistics ASP.NET Core
Next:the default discovery settings are unsuitable for production use...
 Landlord| Posted on 1/26/2021 1:20:32 PM |
var operationName = "Get::api/values/";
var builder = tracer. BuildSpan(operationName);
Posted on 1/27/2021 4:51:17 PM |
The group leader is really powerful
Posted on 9/22/2021 8:36:43 PM |
Learn to learn...
Posted on 5/25/2022 5:01:20 PM |
Learn to learn.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com