perl-opentelemetry
perl-opentelemetry copied to clipboard
Automatically scoped span
This might just be another documentation request.
In my (still very limited) tests this seems like a commonly useful construct:
my $span = $tracer->create_span(name => "foo");
dynamically OpenTelemetry::Context->current = OpenTelemetry::Trace->context_with_span($span);
I don't know if it's possible, but something like
my $span = $tracer->create_scoped_span(name => "foo");
that'd do both in one would be a very useful (and Perl-ish?) feature.