Skip to content

Commit

Permalink
Add quickstart document and relevant example
Browse files Browse the repository at this point in the history
  • Loading branch information
jjatria committed Nov 12, 2024
1 parent 0f12cf5 commit 24a8293
Show file tree
Hide file tree
Showing 8 changed files with 1,107 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Revision history for OpenTelemetry

{{$NEXT}}

* Added OpenTelemetry::Guides::Quickstart and its related
examples. More practical documentation will also occupy
that namespace.

0.025 2024-10-20 13:50:19+01:00 Europe/London

* Fixed an issue in the integrations for HTTP::Tiny and
Expand Down
1 change: 1 addition & 0 deletions examples/guides/quickstart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local/
11 changes: 11 additions & 0 deletions examples/guides/quickstart/Dice
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;

use OpenTelemetry::SDK;
plugin 'OpenTelemetry';

get '/roll' => sub ($c) {
$c->render( json => int 1 + rand 6 );
};

app->start;
7 changes: 7 additions & 0 deletions examples/guides/quickstart/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM perl:5.40

WORKDIR /app
ADD cpanfile cpanfile.snapshot ./
RUN cpm install --local-lib-contained=/root/.local Carton::Snapshot \
&& PERL5OPT="-I/root/.local/lib/perl5" cpm install --global \
&& rm -rf cpanfile cpanfile.snapshot /root/.local
4 changes: 4 additions & 0 deletions examples/guides/quickstart/cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
requires 'Mojolicious';
requires 'Mojolicious::Plugin::OpenTelemetry';
requires 'OpenTelemetry';
requires 'OpenTelemetry::SDK';
Loading

0 comments on commit 24a8293

Please sign in to comment.