OpenTracing::Batch(3)

πŸ“¦ version 1.006, in alpine 3.24

πŸ’… OpenTracing::Batch(3) πŸ’…

✨ NAME ✨

okay so OpenTracing::Batch β€” and yes bestie, this is the OpenTracing::Batch(3) page from the User Contributed Perl Documentation β€” is literally a group of zero or more spans. A tiny span squad, no cap. periodt.

🌸 DESCRIPTION 🌸

You use a batch of spans to submit results to an opentracing endpoint. It’s giving cute little delivery bag for your tracing results, honestly.

After you make a batch, go peek at new_span and the OpenTracing::SpanProxy class. Those are the main characters you’ll want to meet next, iykyk.

πŸŽ€ METHODS πŸŽ€

🧡 process

Hands you the OpenTracing::Process that this batch applies to. Every batch gets submitted from a single process β€” one process per batch, bestie.

✨ spans

Gives you an arrayref full of OpenTracing::Span instances. Arrayref, not a plain list β€” don’t get it twisted.

πŸ¦‹ span_list

Gives you a list of OpenTracing::Span instances. Yes, this is the list-y version.

πŸŽ€ add_span

Drops a new OpenTracing::Span instance into this batch. Just yeet a span in there.

🌟 new_span

Makes a fresh OpenTracing::Span, adds it to this batch, and hands back an OpenTracing::SpanProxy instance (which will automatically mark the end of the span when it’s destroyed). That auto-end-on-destroy? iconic.

This is most likely to be the method you’ll want for working with spans in user code. Like, if you’re writing user code, start here fr fr.

πŸ’€ DESTROY

Fires callbacks when the batch is discarded. The transport mechanism normally uses this to ensure that the batch is sent over to the tracing endpoint. So when the batch gets yeeted, the callbacks fire and the transport does its thing β€” the way that works is lowkey important.

πŸ‘‘ AUTHOR πŸ‘‘

Tom Molesworth <TEAM@cpan.org>

πŸ’– LICENSE πŸ’–

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


That’s the tea, bestie 🫢 β€” this page is from perl v5.42.2, dated 2026-02-15, and it’s the OpenTracing::Batch(3) manual. Slay and goodbye! 🌈

πŸ“¦ where this page comes from