NAME

NewFangle::App - NewRelic application class

VERSION

version 0.09

SYNOPSIS

use NewFangle;
my $app = NewFangle::App->new;

DESCRIPTION

NewRelic application class.

CONSTRUCTOR

new

my $app = NewFangle::App->new($config, $timeout_ms);
my $app = NewFangle::App->new(\%config, $timeout_ms);
my $app = NewFangle::App->new;

Creates a NewFangle application instance. On failure to connect an app instance will still be created and usable, though of course no stats will be sent to NewRelic. There will be appropriate diagnostics sent to the log (configured with newrelic_configure_log in NewFangle). If you want to check if the connection was successful, then you can use the connected method below:

The first argument may be one of:

NewFangle::Config instance
Hash reference

Containing the initialization for a config instance which will be created internally.

If $timeout_ms is the maximum time to wait for a connection to be established. If not specified, then only one attempt at connecting to the daemon will be made.

(csdk: newrelic_create_app)

start_web_transaction

my $txn = $app->start_web_transaction($name);

Starts a web based transaction. Returns the NewFangle::Transaction instance.

(csdk: newrelic_start_web_transaction)

start_non_web_transaction

my $txn = $app->start_non_web_transaction($name);

Starts a non-web based transaction. Returns the NewFangle::Transaction instance.

(csdk: newrelic_start_web_transaction)

connected

my $bool = $app->connected;

Returns true if the app class was able to connect to the local NewRelic daemon on startup.

SEE ALSO

NewFangle

AUTHOR

Author: Graham Ollis <plicease@cpan.org>

Contributors:

Owen Allsopp (ALLSOPP)

COPYRIGHT AND LICENSE

This software is copyright (c) 2020-2022 by Graham Ollis.

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