NewFangle::App - NewRelic application class
version 0.09
use NewFangle; my $app = NewFangle::App->new;
NewRelic application class.
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:
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)
my $txn = $app->start_web_transaction($name);
Starts a web based transaction. Returns the NewFangle::Transaction instance.
(csdk: newrelic_start_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)
my $bool = $app->connected;
Returns true if the app class was able to connect to the local NewRelic daemon on startup.
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Owen Allsopp (ALLSOPP)
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.