NAME

OpenTelemetry::SDK::Trace::Span::Processor::Simple - A basic OpenTelemetry span processor

SYNOPSIS

...

DESCRIPTION

This is a simple processor that receives spans to process and forwards them to an exporter.

This processor will mostly be useful for testing. It could be suitable for use in production environments in cases where custom attributes should be added to spans based on code scopes, etc.

METHODS

This class inherits from OpenTelemetry::Processor::Simple and implements the OpenTelemetry::Trace::Span::Processor role. Please consult the documentation of those modules for details on the behaviours they provide. The description below will only refer to those behaviours that differ.

on_start

$processor->on_start( $span, $parent_context );

Called when a span is started. In this class, this method does nothing.

on_end

$processor->on_end( $span );

Called when a span is ended, with the span that has just ended as its only parameter. This should be called after the span has been ended.

This method internally passes the span to "process" in OpenTelemetry::Processor::Simple.

SEE ALSO

Future
OpenTelemetry::Exporter
OpenTelemetry::SDK::Trace::Span::Readable
OpenTelemetry::Trace::Span
OpenTelemetry::Trace::Span::Processor
OpenTelemetry::Trace::Span::Processor::Batch

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by José Joaquín Atria.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.