Comments (5)
Service name does not get set when the Tracer is initialized.
var x = Tracer.Create(uri, "testme");
var span = Tracer.Instance.StartSpan("csharpSpan");
Log.Debug(span.ServiceName); <-- returns server
from dd-trace-dotnet.
Thanks for reporting this! It will be fixed in the next release.
from dd-trace-dotnet.
TL;DR: We are adding support for changing the service name on the underlying span when using OpenTracing.ISpan.SetTag()
in #229.
Currently, the Datadog.Trace
library (which Datadog.Trace.OpenTracing
uses behind-the-scenes) does not allow changing a span's service name after the span is created. This feature will be added as part of a larger refactoring. When using the OpenTracing library, using ISpanBuilder.WithTag()
before a span is created works correctly, but calling ISpan.SetTag()
after the span is created would not.
from dd-trace-dotnet.
@willyyang: Note that Tracer.Instance.StartSpan("csharpSpan")
sets the operation name, not the service name. You want:
var span = Tracer.Instance.StartSpan("operation", serviceName: "service");
See:
dd-trace-dotnet/src/Datadog.Trace/Tracer.cs
Line 143 in cbf2af4
Let's limit this issue to using OpenTracing.ISpan.SetTag()
to change the service name after a span is created. If you have further problems with Tracer.Instance.StartSpan()
, please open a new issue.
from dd-trace-dotnet.
@pgrm: We just released v0.6.0. It allows you to change the service name with OpenTracing.ISpan.SetTag()
, so I'm closing this issue. Thanks again!
from dd-trace-dotnet.
Related Issues (20)
- Add the ability to exclude classes from the trace HOT 4
- .net6 hosted service not sending metrics automatically HOT 6
- Large CPU impact when running continuous profiler for dozens of applications HOT 4
- AWS SQS: message size limit exceeded after adding attributes HOT 4
- The invoked member is not supported in a dynamic assembly HOT 5
- .NET runtime metrics reporting stale data since version 2.31.0 of Tracer HOT 2
- net461 folder not created HOT 2
- AspNetCore middleware is throwing unhandled exception on shutdown HOT 6
- DataDog tracer detects incorrect .NET 6 Runtime version HOT 2
- Sporadic TypeLoadException HOT 4
- 502 error on POST
- MQ integration prepends BOM to message body HOT 4
- Bundled Tracer fails to load with .NET 8 and COMPlus_EnableDiagnostics=0 HOT 11
- System.NullReferenceException in RedisExecuteAsyncIntegration.OnMethodBegin(RedisBase , Message& , ResultProcessor`1& , ServerEndPoint& ) HOT 2
- Support `Microsoft.Azure.WebJobs.Extensions.Kafka.KafkaTrigger` in Azure Functions
- Understand correct approach to encapsulating the `dd-trace-dotnet` sdk HOT 2
- Instrument Quartz.Net HOT 1
- Auto-instrumentation for Blazor HOT 4
- Support Span LInks HOT 3
- Tracer agent stops reporting APM data HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-dotnet.