Configure LightStep exporter to see traces in LightStep.
- Setup LightStep using getting started guide
- Configure
LightStepTraceExporter
(see below)
using (var tracerFactory = TracerFactory.Create(
builder => builder.UseLightStep(o =>
{
o.AccessToken = "<access-token>";
o.ServiceName = "lightstep-test";
})))
{
var tracer = tracerFactory.GetTracer("lightstep-test");
using (tracer.StartActiveSpan("incoming request", out var span))
{
span.SetAttribute("custom-attribute", 55);
await Task.Delay(1000);
}
}