All Projects → opentracing-contrib → Csharp Netcore

opentracing-contrib / Csharp Netcore

Licence: apache-2.0
OpenTracing instrumentation for .NET Core & .NET 5 apps

Projects that are alternatives of or similar to Csharp Netcore

Jaeger Ui
Web UI for Jaeger
Stars: ✭ 639 (+184%)
Mutual labels:  tracing, distributed-tracing, opentracing
smallrye-opentracing
An MicroProfile-OpenTracing implementation
Stars: ✭ 17 (-92.44%)
Mutual labels:  tracing, opentracing, distributed-tracing
nodejs
Node.js in-process collectors for Instana
Stars: ✭ 66 (-70.67%)
Mutual labels:  tracing, opentracing, distributed-tracing
ruby-sensor
💎 Ruby Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 23 (-89.78%)
Mutual labels:  tracing, opentracing, distributed-tracing
Haystack
Top level repository for Haystack, containing documentation and deployment scripts
Stars: ✭ 261 (+16%)
Mutual labels:  tracing, distributed-tracing, opentracing
go-sensor
🚀 Go Distributed Tracing & Metrics Sensor for Instana
Stars: ✭ 90 (-60%)
Mutual labels:  tracing, opentracing, distributed-tracing
easeagent
An agent component for the Java system
Stars: ✭ 437 (+94.22%)
Mutual labels:  tracing, opentracing, distributed-tracing
Zipkin Go Opentracing
OpenTracing Bridge for Zipkin Go
Stars: ✭ 472 (+109.78%)
Mutual labels:  tracing, distributed-tracing, opentracing
Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (-71.56%)
Mutual labels:  tracing, distributed-tracing, opentracing
Dotnetcore
.NET 5 Nuget Packages.
Stars: ✭ 146 (-35.11%)
Mutual labels:  aspnetcore, dotnet-core
Java Specialagent
Automatic instrumentation for 3rd-party libraries in Java applications with OpenTracing.
Stars: ✭ 156 (-30.67%)
Mutual labels:  tracing, opentracing
Netcorecms
NetCoreCMS is a modular theme supported Content Management System developed using ASP.Net Core 2.0 MVC. Which is also usable as web application framework. This project is still under development. Please do not use before it's first release.
Stars: ✭ 165 (-26.67%)
Mutual labels:  aspnetcore, dotnet-core
Pinpoint
APM, (Application Performance Management) tool for large-scale distributed systems.
Stars: ✭ 11,883 (+5181.33%)
Mutual labels:  tracing, distributed-tracing
Stagemonitor
an open source solution to application performance monitoring for java server applications
Stars: ✭ 1,664 (+639.56%)
Mutual labels:  tracing, opentracing
Natchez
functional tracing for cats
Stars: ✭ 214 (-4.89%)
Mutual labels:  tracing, opentracing
Apm Agent Php
Elastic APM PHP Agent
Stars: ✭ 129 (-42.67%)
Mutual labels:  tracing, distributed-tracing
Opencensus Web
A stats collection and distributed tracing framework
Stars: ✭ 168 (-25.33%)
Mutual labels:  tracing, distributed-tracing
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+915.56%)
Mutual labels:  aspnetcore, dotnet-core
Loki
Loki: Simple, Distributed Tracing
Stars: ✭ 127 (-43.56%)
Mutual labels:  distributed-tracing, opentracing
Apm Agent Rum Js
Elastic APM Real User Monitoring JavaScript agent
Stars: ✭ 166 (-26.22%)
Mutual labels:  tracing, distributed-tracing

nuget

OpenTracing instrumentation for .NET Core apps

This repository provides OpenTracing instrumentation for .NET Core based applications. It can be used with any OpenTracing compatible tracer.

IMPORTANT: OpenTracing and OpenCensus have merget to form OpenTelemetry! The OpenTelemetry .NET library can be found at https://github.com/open-telemetry/opentelemetry-dotnet.

Supported .NET versions

This project currently only supports apps targeting netcoreapp2.1 (.NET Core 2.1), netcoreapp3.1 (.NET Core 3.1) or net5.0 (.NET 5.0)!

This project DOES NOT support the full .NET framework as that uses different instrumentation code.

Supported libraries and frameworks

DiagnosticSource based instrumentation

This project supports any library or framework that uses .NET's DiagnosticSource to instrument its code. It will create a span for every Activity and it will create span.Log calls for all other diagnostic events.

To further improve the tracing output, the library provides enhanced instrumentation (Inject/Extract, tags, configuration options) for the following libraries / frameworks:

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

Microsoft.Extensions.Logging based instrumentation

This project also adds itself as a logger provider for logging events from the Microsoft.Extensions.Logging system. It will create span.Log calls for each logging event, however it will only create them if there is an active span (ITracer.ActiveSpan).

Usage

This project depends on several packages from Microsofts Microsoft.Extensions.* stack (e.g. Dependency Injection, Logging) so its main use case is ASP.NET Core apps and any other Microsoft.Extensions-based console apps.

1. Add the NuGet package OpenTracing.Contrib.NetCore to your project.
2. Add the OpenTracing services to your IServiceCollection via services.AddOpenTracing().

How you do this depends on how you've setup the Microsoft.Extensions.DependencyInjection system in your app.

In ASP.NET Core apps you can add the call to your ConfigureServices method (of your Program.cs file):

public static IWebHost BuildWebHost(string[] args)
{
    return WebHost.CreateDefaultBuilder(args)
        .UseStartup<Startup>()
        .ConfigureServices(services =>
        {
            // Enables and automatically starts the instrumentation!
            services.AddOpenTracing();
        })
        .Build();
}
3. Make sure InstrumentationService, which implements IHostedService, is started.

InstrumentationService is responsible for starting and stopping the instrumentation. The service implements IHostedService so it is automatically started in ASP.NET Core, however if you have your own console host, you manually have to call StartAsync and StopAsync.

Note that .NET Core 2.1 greatly simplified this setup by introducing a generic HostBuilder that works similar to the existing WebHostBuilder from ASP.NET Core. Have a look at the TrafficGenerator sample for an example of a HostBuilder based console application.

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].