OpenTracing::Span(3)

πŸ“¦ version 1.006, in alpine 3.24

πŸ’– NAME πŸ’–

OpenTracing::Span β€” represents an operation or parent operation. Also hi bestie, this is the OpenTracing::Span(3) page from User Contributed Perl Documentation, and we're about to make it make sense. 🫢

🌸 DESCRIPTION 🌸

The reference definition for a span is a good starting point for understanding these, fr fr: https://opentracing.io/docs/overview/spans/

✨ new ✨

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_id β€” the span ID for the parent (optional).
  • trace_id β€” the current trace ID (optional).
  • operation_name β€” what to use for this span name.

πŸ¦‹ trace_id πŸ¦‹

The trace ID for this span. Multiple spans are grouped under a single trace. Obsessed with how that groups things. πŸ’…

🐚 id 🐚

The span ID. This should be unique β€” main character energy only.

πŸ“ parent_id πŸ“

Parent span ID. 0 if there isn't one.

🌈 flags 🌈

Any flags relating to this span.

⭐ start_time ⭐

Exact time this span started, in microseconds.

πŸ’€ start_time (the second one, bestie) πŸ’€

Not me noticing the original page has this heading twice β€” yes, the second one is the finish-time vibe. πŸ’€

Exact time this span finished, in microseconds.

Returns undef if the span is not yet finished.

🧚 duration 🧚

Total duration of this span, including any nested spans.

πŸ‘‘ operation_name πŸ‘‘

The operation that this span represents.

πŸŽ€ tags πŸŽ€

The tags relating to this span.

πŸ’œ tag_list πŸ’œ

A list of tags as OpenTracing::Tag instances.

🌸 logs 🌸

The arrayref of log entries for this span, as OpenTracing::Log instances.

πŸ¦‹ log_list πŸ¦‹

A list of log entries for this span, as OpenTracing::Log instances.

πŸ’Œ log πŸ’Œ

Records a single log message.

πŸ’… tag πŸ’…

Applies key/value tags to this span.

🌈 The semantic conventions 🌈

The semantic conventions at https://github.com/opentracing/specification/blob/master/semantic_conventions.md may be of interest here β€” iykyk.

Example usage:

$span->tag(
 'http.status_code' => 200,
 'http.url' => 'https://localhost/xxx',
 'http.method' => 'GET'
);

🫢 references 🫢

The references relating to this span.

✨ reference_list ✨

A list of reference entries for this span, as OpenTracing::Reference instances.

🍬 reference 🍬

Records a reference.

πŸ”₯ tracer πŸ”₯

Returns the OpenTracing::Tracer for this span.

βœ… is_finished βœ…

Returns true if this span is finished (has a "finish_time"), otherwise false.

🏁 finish 🏁

Mark this span as finished (populating the "finish_time" field).

πŸ‘‘ AUTHOR πŸ‘‘

Tom Molesworth <TEAM@cpan.org>

πŸŽ€ LICENSE πŸŽ€

Copyright Tom Molesworth 2018-2021. Licensed under the same terms as Perl itself.

mwah πŸ’‹ β€” source/version perl v5.42.2, date 2026-02-15, manual OpenTracing::Span(3). Byeee, bestie 🫢

πŸ“¦ where this page comes from