Introduce span/2
Closed this issue · 6 comments
span/2
will receive an event name and it will listen to two events:
event_name ++ [:start]
event_name ++ [:stop]
This new function should also document best practices in regards to emitting start and stop, specifically the use of try/after
and try/catch/else
.
There is one last question: which reporter would use spans? I believe statsd and prometheus do not. Which ones do? Knowing this information is important so we can verify the feature works as expected.
OpenTelemetry can use them.
We could theoritically let StatsD reporter use it when DataDog fomatter is used. But I think it could be difficult to discover, as "StatsD" doesn't necessarily scream "tracing".
This got me wondering if Telemetry.Metrics
is the right place for that function. Maybe we should have Telemetry.Tracing
?
@hauleth I realize that - what I meant is that we support sending metrics to DataDog with StatsD reporter, so maybe we could also support sending traces. But at the same time, it might be confusing and hard to discover.
I think the main reporter would be OpenTelemetry, but the integration for that doesn't exist yet.
If you're just looking for a way to test that things are working properly, probably just a console/Logger
reporter would work.
Closing this for now as we added telemetry:span/3.