Compare commits

..

2 Commits

Author SHA1 Message Date
e590fe26e5 Merge branch 'slapbird' 2024-08-15 12:25:19 -04:00
e31dbcc9da Implement API key for SlapbirdAPM 2024-08-09 21:13:02 -04:00
2 changed files with 7 additions and 0 deletions

View File

@ -7,3 +7,4 @@ requires 'XML::RSS';
requires 'Text::Markdown'; requires 'Text::Markdown';
requires 'HTML::Restrict'; requires 'HTML::Restrict';
requires 'Roman::Unicode'; requires 'Roman::Unicode';
requires 'SlapbirdAPM::Agent::Mojo';

View File

@ -19,6 +19,12 @@ sub startup($self) {
$self->plugin('Config'); $self->plugin('Config');
$self->plugin('TagHelpers::Pagination'); $self->plugin('TagHelpers::Pagination');
# Alpha testing Slapbird APM
if (my $slapbirdapm_api_key = $self->config->{'slapbirdapm_api_key'}) {
$self->plugin('SlapbirdAPM', key => $slapbirdapm_api_key)
if $self->mode eq 'production'
}
# Helpers # Helpers
$self->helper(pg => sub ($c) { $self->helper(pg => sub ($c) {
state $pg = Mojo::Pg->new($c->config->{$self->mode}{'pg_string'}) state $pg = Mojo::Pg->new($c->config->{$self->mode}{'pg_string'})