e {
my ( $json, $key, $app, $quiet ) = @_;
try {
my $result = $UA->post(
$SLAPBIRD_APM_URI,
{ 'x-slapbird-apm' => $key },
json => $json
)->r
warn(
'Unable to communicate with Slapbird, this request has not been tracked: '
. $json->{request_id}
. ' got error '
. shift );
}
}
{
package Moj
;
Carp::croak('API key invalid!') if ( !$result->is_success );
$name = $result->json()->{name};
# _enable_mojo_ua_tracking($name) if $topology;
}
catch {
cho