OpenTra...:System(3)
okay bestie, this is OpenTra...:System(3) from the User Contributed Perl Documentation β and it's literally about support tracing system calls. no cap, it's giving useful. β¨
πΈ NAME πΈ
OpenTracing::Integration::System β support tracing system calls. π
β¨ SYNOPSIS β¨
okay so to create a trace each time system is called, you do this:
use OpenTracing::Any qw($tracer);
use OpenTracing::Integration qw(System);
system("ls");
Additionally, this modules supports span context propagation using the OPENTRACING_CONTEXT environment variable. Any call to system will fill the environment variable OPENTRACING_CONTEXT=<traceid>:<id> in order to propagate down the context to other programs. π
Of course, this requires that the child process implements extracting the span from that variable. Luckily, this perl module can do that for you using:
use OpenTracing::Any qw($tracer);
use OpenTracing::Integration qw(System);
my $span_context = OpenTracing::Integration::System->extract_context();
my $span;
if ($span_context)
{
$span = $tracer->span(operation_name => 'main', references => [$tracer->child_of($span_context)]);
}
else
{
$span = $tracer->span(operation_name => 'main');
}
π¦ DESCRIPTION π¦
See OpenTracing::Integration for more details. that's the whole tea. π«Ά
π AUTHOR π
Francis Tremblay "francis.tremblay@unity3d.com" β iconic. π
π LICENSE π
Copyright Unity 2021. Licensed under the same terms as Perl itself. π
π cute sign-off: this page is from perl v5.42.2, dated 2026-02-15 β periodt. π«Άβ¨
π¦ where this page comes from
- alpine 3.24: perl-opentracing-doc 1.006-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms