This is part of an ongoing attempt at implementing the OpenTelemetry standard in Perl. The distribution in this repository implements a plugin for the Mojolicious web-framework, to generate and capture telemetry data using the OpenTelemetry API.
OpenTelemetry is an open source observability framework, providing a general-purpose API, SDK, and related tools required for the instrumentation of cloud-native software, frameworks, and libraries.
OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools.
This distribution allows authors of Mojolicious applications to generate telemetry data from their applications with minimal changes. In keeping with the API / SDK separation described above, this plugin does not itself collect or export this telemetry data. For that you will need to wire in the SDK, for which the best place to start is that distribution's documentation.
Install this distribution from CPAN:
cpanm Mojolicious::Plugin::OpenTelemetry
or directly from the repository if you want to install a development version (although note that only the CPAN version is recommended for production environments):
# On a local fork
cd path/to/this/repo
cpanm install .
# Over the net
cpanm https://github.com/jjatria/mojolicious-plugin-opentelemetry.git
Then, enable the plugin in your Mojolicious application. Remember to use the SDK to be able to use this telemetry data.
use Mojolicious::Lite -signatures;
plugin 'OpenTelemetry';
# Requests to this will automatically generate telemetry data
get '/' => { text => 'OK' };
We are in the process of setting up an OpenTelemetry-Perl special interest group (SIG). Until that is set up, you are free to express your interest or join us in IRC on the #io-async channel in irc.perl.org.
This distribution is licensed under the same terms as Perl itself. See LICENSE for more information.