NAME

NewFangle::Config - NewRelic Configuration class.

VERSION

version 0.09

SYNOPSIS

 use NewFangle;
 my $config = NewFangle::Config->new(
   app_name => 'AppName',
   license_key => '',
   datastore_tracer => {
     database_name_reporting => 1,
     instance_reporting      => 1,
   },
   distributed_tracing => {
     enabled => 0,
   },
   log_filename => '',
   log_level => 'error',
   redirect_collector => '',
   span_events => {
     enabled => 1,
   },
   transaction_tracer => {
     datastore_reporting => {
       enabled => 1,
       record_sql => 'obfuscated',
       threshold_us => 500000,
     },
     duration_us => 0,
     enabled => 1,
     stack_trace_threshold_us => 500000,
     threshold => 'is_apdex_failing',
   },
 );

DESCRIPTION

This class provides an interface to the NewFangle configuration.

CONSTRUCTOR

new

 my $config = NewFangle::Config->new(%config);
 my $config = NewFangle::Config->new;

Creates a new configuration instance. The synopsis above provides all of the configurable items that can be passed to the constructor. Please see the C-SDK documentation for details on what these all mean.

If app_name is not specified then the environment variable NEWRELIC_APP_NAME will be used. If license_key is not specified then the environment variable NEWRELIC_LICENSE_KEY will be used.

(csdk: newrelic_create_app_config)

METHODS

to_perl

 my $hash = $config->to_perl;

Convert the configuration back to a Perl hash reference. This may be useful to debugging or diagnostics.

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.