Arguments #
All arguments are passed as key => value pairs.
Ignored Headers #
Sets headers to be ignored in the header output.
Pass the headers to be exluded as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
plugin 'SlapbirdAPM',
ignored_headers => ['Header'];
# Set up your endpoints
app->start;
```
Set the ignored_headers in your config.yaml.
```yaml
plugins:
SlapbirdAPM:
ignore_headers:
- 'Header'
```
Pass the headers to the SlapbirdAPM plugin as part of the builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
builder {
enable 'SlapbirdAPM', ignored_headers => ['Header'];
$app;
};
```
Key #
Setting the key is required to see analytics.
Login to SlapbirdAPM via Github.
Copy your API key.
Add the SLAPBIRDAPM_API_KEY environment variable to your application, or set it in your plugin configuration.
Pass the API key as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
plugin 'SlapbirdAPM',
key => 'your_slapbirdapm_api_key';
# Set up your endpoints
app->start;
```
Set the API key in your config.yaml.
```yaml
plugins:
SlapbirdAPM:
key: 'your_slapbirdapm_api_key'
```
Pass the API key to the SlapbirdAPM plugin as part of the builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
builder {
enable 'SlapbirdAPM', key => 'your_slapbird_api_key';
$app;
};
```
Quiet #
quiet hides all warnings. Disabled by default.
Enable or disable quiet mode as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
plugin 'SlapbirdAPM',
quiet => 1;
# Set up your endpoints
app->start;
```
Enable or disable quiet mode in your config.yaml.
```yaml
plugins:
SlapbirdAPM:
quiet: 1
```
Enable or disable quiet mode in the SlapbirdAPM plugin as part of the builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
builder {
enable 'SlapbirdAPM', quiet => 1;
$app;
};
```
Topology #
Topology allows viewing dependencies of services. Enabled by default.
Enable or disable topology as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
# disable topology
plugin 'SlapbirdAPM',
topology => 0;
# Set up your endpoints
app->start;
```
Enable or disable topology in your config.yaml.
```yaml
# disable topology
plugins:
SlapbirdAPM:
topology: 0
```
Enable or disable topology in the SlapbirdAPM plugin as part of the builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
# disable topology
builder {
enable 'SlapbirdAPM', topology => 0;
$app;
};
```
Trace #
Trace enables or disables stacktraces per request. Enabled by default.
Disabling improves performance.
Enable or disable stacktraces as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
# disable stacktrace
plugin 'SlapbirdAPM',
trace => 0;
# Set up your endpoints
app->start;
```
Enable or disable stacktraces in your config.yaml.
```yaml
# disable stacktraces
plugins:
SlapbirdAPM:
trace: 0
```
Enable or disable stacktraces in your SlapbirdAPM plugin as part of the builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
# disable stacktraces
builder {
enable 'SlapbirdAPM', trace => 0;
$app;
};
```
Trace Modules #
Set modules to trace.
Pass the modules to trace as part of the plugin setup.
```perl
use Mojolicious::Lite -signatures;
plugin 'SlapbirdAPM',
trace_modules => ['My::Module'];
# Set up your endpoints
app->start;
```
Set the modules to trace in your config.yaml.
```yaml
plugins:
SlapbirdAPM:
trace_modules:
- 'My::Module'
```
Pass the modules to trace to the SlapbirdAPM plugin in your builder declaration.
```perl
use Plack::Builder;
# Set up your endpoints
builder {
enable 'SlapbirdAPM', trace_modules => ['My::Module'];
$app;
};
```