Mixing OpenTracing and automatic instrumentation
See original GitHub issueI’m using 1.7 of the .NET stuff for .NET Core. I followed the example on how to add OpenTracing to my DI and sprinkled it thru my code. (https://docs.datadoghq.com/tracing/advanced/opentracing/?tab=net)
public static IServiceCollection AddTracer(this IServiceCollection services)
{
ITracer tracer = OpenTracingTracerFactory.CreateTracer();
GlobalTracer.Register(tracer);
services.TryAddSingleton(tracer);
return services;
}
using (IScope scope = _tracer.BuildSpan(someSpan).StartActive())
{
// logic
}
However, I’m not seeing the the custom traces/spans on the flame charts. I am seeing the automatically instrumented spans.
Is there a special sauce I’m missing? Does this require a certain version of the agent to be run?
(edit: formatting)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Introduction to Instrumentation with OpenTracing and Jaeger
This will introduce you to the instrumentation of your application code for distributed tracing with OpenTracing and Jaeger.
Read more >Instrumentation
Note, that for most languages it is possible to use both manual and automatic instrumentation at the same time: Automatic Instrumentation will ...
Read more >Migrating from OpenTracing
To ease migration, OpenTelemetry supports the use of both the OpenTelemetry and OpenTracing APIs in the same codebase. This allows OpenTracing instrumentation ......
Read more >Distributed Tracing, OpenTracing and Elastic APM
OpenTracing is the industry's first step towards standardization for distributed tracing. We still have a long way to go for full compatibility.
Read more >OpenTracing vs OpenTelemetry
Further testing will happen mixing OpenTracing with OpenTelemetry instrumentation, making sure the entire pipe works smoothly.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @daniel-white, we’ve just released version 1.8.0 of the tracer which adds a new API
OpenTracingTracerFactory.WrapTracer
(thank you @alexeyzimarev for the contribution!). Using this for your use-case should look like the following:Please let us know if you run into any other issues and feedback, as we’re looking to better support manual instrumentation and OpenTracing scenarios.
@colin-higgins the issue is that the Datadog tracer is very limited. I cannot find any way to access the scope context and extract/inject it for distributed tracing. OpenTracing has it all. Without distributed tracing, the whole tracing idea is almost pointless.