All Projects → petabridge → Petabridge.Tracing.ApplicationInsights

petabridge / Petabridge.Tracing.ApplicationInsights

Licence: Apache-2.0 license
OpenTracing adapter for Microsoft Application Insights

Programming Languages

C#
18002 projects
powershell
5483 projects
F#
602 projects
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Petabridge.Tracing.ApplicationInsights

post-kafka-opentracing
Post: Tracing Kafka Applications
Stars: ✭ 18 (-40%)
Mutual labels:  opentracing, distributed-tracing, jaegertracing
Jaeger Php
Jaeger Bindings for PHP OpenTracing API
Stars: ✭ 185 (+516.67%)
Mutual labels:  opentracing, distributed-tracing
Loki
Loki: Simple, Distributed Tracing
Stars: ✭ 127 (+323.33%)
Mutual labels:  opentracing, distributed-tracing
Mastering Distributed Tracing
"Mastering Distributed Tracing" by Yuri Shkuro, published by Packt
Stars: ✭ 189 (+530%)
Mutual labels:  opentracing, distributed-tracing
Applicationinsights Go
Microsoft Application Insights SDK for Go
Stars: ✭ 113 (+276.67%)
Mutual labels:  application-insights, distributed-tracing
Brave Opentracing
Bridge between OpenTracing and Brave
Stars: ✭ 64 (+113.33%)
Mutual labels:  opentracing, distributed-tracing
Applicationinsights Php
Azure Application Insights SDK for PHP
Stars: ✭ 98 (+226.67%)
Mutual labels:  application-insights, distributed-tracing
Jaeger Client Go
Jaeger Bindings for Go OpenTracing API.
Stars: ✭ 1,035 (+3350%)
Mutual labels:  opentracing, distributed-tracing
Applicationinsights Aspnetcore
ASP.NET Core web applications monitoring
Stars: ✭ 306 (+920%)
Mutual labels:  application-insights, distributed-tracing
Applicationinsights Dotnet
ApplicationInsights-dotnet
Stars: ✭ 367 (+1123.33%)
Mutual labels:  application-insights, distributed-tracing
Applicationinsights Java
Application Insights for Java
Stars: ✭ 172 (+473.33%)
Mutual labels:  application-insights, distributed-tracing
Applicationinsights Python
Application Insights SDK for Python
Stars: ✭ 114 (+280%)
Mutual labels:  application-insights, distributed-tracing
Applicationinsights Home
Application Insights main repository for documentation of overall SDK offerings for all platforms.
Stars: ✭ 221 (+636.67%)
Mutual labels:  application-insights, distributed-tracing
Opentracing Auto
Out of the box distributed tracing for Node.js applications with OpenTracing.
Stars: ✭ 110 (+266.67%)
Mutual labels:  opentracing, distributed-tracing
Jaeger Client Ruby
OpenTracing Tracer implementation for Jaeger in Ruby
Stars: ✭ 59 (+96.67%)
Mutual labels:  opentracing, distributed-tracing
Jaeger
CNCF Jaeger, a Distributed Tracing Platform
Stars: ✭ 14,813 (+49276.67%)
Mutual labels:  opentracing, distributed-tracing
Applicationinsights Dotnet Server
Microsoft Application Insights for .NET Web Applications
Stars: ✭ 130 (+333.33%)
Mutual labels:  application-insights, distributed-tracing
Jaeger Ui
Web UI for Jaeger
Stars: ✭ 639 (+2030%)
Mutual labels:  opentracing, distributed-tracing
Core
Package core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go.
Stars: ✭ 34 (+13.33%)
Mutual labels:  opentracing, distributed-tracing
Csharp Netcore
OpenTracing instrumentation for .NET Core & .NET 5 apps
Stars: ✭ 225 (+650%)
Mutual labels:  opentracing, distributed-tracing

Petabridge.Tracing.ApplicationInsights

This project is an OpenTracing distributed tracing driver built on top of Microsoft's Application Insights telemetry SDK. It is designed to allow developers consuming libraries and frameworks that expose the OpenTracing ITracer to be able to seamlessly swap in our ApplicationInsightsTracer as a vendor implementation if they so desire.

This driver follows the Application Insights to OpenTracing conventions outlined by the Application Insights team.

Petabridge.Tracing.ApplicationInsights is professionally maintained and tested by Petabridge and is used inside some of our commercial products, such as Phobos: Enterprise Akka.NET DevOps.

Quickstart

To get started with Petabridge.Tracing.ApplicationInsights, install the NuGet package:

PS> Install-Package Petabridge.Tracing.ApplicationInsights

And then instantiate an instance of the ApplicationInsightsTracer class, like so:

// use the active TelemetryConfiguration, if available
var tracer = new ApplicationInsightsTracer(TelemetryConfiguration.Active);

// record some new spans
using (var current = tracer.BuildSpan(Context.Self.Path.ToString()).StartActive())
{
    _loggingAdapter.Info(str);
    current.Span.Log(str);
    current.Span.SetTag("strLen", str.Length);

    using (var subOp = _tracer.BuildSpan(Context.Self.Path.ToString() + ".subOp").StartActive())
    {
        subOp.Span.Log("Do nested operations work?");
        subOp.Span.SetTag("nested", true);
    }
}

The output from this activity will show up as "Server Requests" in Application Insights:

Petabridge.Tracing.ApplicationInsights spans showing up as server requests

When using ApplicationInsightsTracer, if you want to record an operation as a "dependency" request, for instance if it's coming from a client app or driver, then make sure you call ApplicationInsightsTracer.BuildSpan("operationName").WithSpanKind(SpanKind.CLIENT). This will change how the ISpan is recorded in Application Insights.

Each distributed trace, even across multiple services and devices, is correlated automatically in Application Insights:

Petabridge.Tracing.ApplicationInsights trace shown inside end-to-end transaction details inside Application Insights

From a correlation standpoint:

  1. Each ISpan is recorded as either Request or Dependency telemetry inside Application Insights, depending upon which SpanKind was specified. By default it's SpanKind.SERVER, which correlates to Request telemetry.
  2. Each ISpan.Log call in OpenTracing is recorded as a Trace event inside Application Insights.
  3. OpenTracing IScopeManager and IScope still works as expected.
  4. All ISpan.SetTag calls append tags to the current Request or Dependency telemetry.

Building this solution

To run the build script associated with this solution, execute the following:

Windows

c:\> build.cmd all

Linux / OS X

c:\> build.sh all

If you need any information on the supported commands, please execute the build.[cmd|sh] help command.

This build script is powered by FAKE; please see their API documentation should you need to make any changes to the build.fsx file.

Conventions

The attached build script will automatically do the following based on the conventions of the project names added to this project:

  • Any project name ending with .Tests will automatically be treated as a XUnit2 project and will be included during the test stages of this build script;
  • Any project name ending with .Tests will automatically be treated as a NBench project and will be included during the test stages of this build script; and
  • Any project meeting neither of these conventions will be treated as a NuGet packaging target and its .nupkg file will automatically be placed in the bin\nuget folder upon running the build.[cmd|sh] all command.

DocFx for Documentation

This solution also supports DocFx for generating both API documentation and articles to describe the behavior, output, and usages of your project.

All of the relevant articles you wish to write should be added to the /docs/articles/ folder and any API documentation you might need will also appear there.

All of the documentation will be statically generated and the output will be placed in the /docs/_site/ folder.

Previewing Documentation

To preview the documentation for this project, execute the following command at the root of this folder:

C:\> serve-docs.cmd

This will use the built-in docfx.console binary that is installed as part of the NuGet restore process from executing any of the usual build.cmd or build.sh steps to preview the fully-rendered documentation. For best results, do this immediately after calling build.cmd buildRelease.

Release Notes, Version Numbers, Etc

This project will automatically populate its release notes in all of its modules via the entries written inside RELEASE_NOTES.md and will automatically update the versions of all assemblies and NuGet packages via the metadata included inside common.props.

If you add any new projects to the solution created with this template, be sure to add the following line to each one of them in order to ensure that you can take advantage of common.props for standardization purposes:

<Import Project="..\common.props" />
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].