OpenTracing::Span - represents an operation or parent operation
The reference definition for a span is a good starting point for understanding these:
https://opentracing.io/docs/overview/spans/
Instantiates a new span. Rarely called directly - you'd want to let the OpenTracing::Tracer take care of this for you.
Takes the following named parameters:
parent - an OpenTracing::Span for a parent instance (optional)
parent
parent_id - the span ID for the parent (optional)
parent_id
trace_id - the current trace ID (optional)
trace_id
operation_name - what to use for this span name
operation_name
The trace ID for this span. Multiple spans are grouped under a single trace.
The span ID. This should be unique.
Parent span ID. 0 if there isn't one.
Any flags relating to this span.
Exact time this span started, in microseconds.
Exact time this span finished, in microseconds.
Returns undef if the span is not yet finished.
undef
Total duration of this span, including any nested spans.
The operation that this span represents.
The tags relating to this span.
A list of tags as OpenTracing::Tag instances.
The arrayref of log entries for this span, as OpenTracing::Log instances.
A list of log entries for this span, as OpenTracing::Log instances.
Records a single log message.
Applies key/value tags to this span.
The semantic conventions may be of interest here.
Example usage:
$span->tag( 'http.status_code' => 200, 'http.url' => 'https://localhost/xxx', 'http.method' => 'GET' );
The references relating to this span.
A list of reference entries for this span, as OpenTracing::Reference instances.
Records a reference.
Returns the OpenTracing::Tracer for this span.
Returns true if this span is finished (has a "finish_time"), otherwise false.
Mark this span as finished (populating the "finish_time" field).
Tom Molesworth <TEAM@cpan.org>
Copyright Tom Molesworth 2018-2021. Licensed under the same terms as Perl itself.
To install OpenTracing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenTracing
CPAN shell
perl -MCPAN -e shell install OpenTracing
For more information on module installation, please visit the detailed CPAN module installation guide.