I'm trying to use the Jaeger package to send traces to Jaeger from a C# app.
There are no minimal examples in the jaeger-client-csharp documentation, but from what I read, I think this should work.
using Jaeger;
using Jaeger.Samplers;
namespace jaegertest
{
class Program
{
static void Main(string[] args)
{
var tracer = new Tracer.Builder("my-service")
.WithSampler(new ConstSampler(true))
.Build();
using (var scope = tracer.BuildSpan("foo").StartActive(true))
{
System.Threading.Thread.Sleep(1000);
}
}
}
}
I have jaeger-all-in-one.exe running but when I run this code there's no sign of any new traces. I've tried manually configuring samplers, senders, reporters, etc. but nothing I tried worked. What do I need to add to get my traces to appear in Jaeger?
This is the simplest working example that I was able to find.
Here is a more realistic example that builds the tracer from a configuration.