Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Elastic Apm Php Agent Laravel Package

nipwaayoni/elastic-apm-php-agent

Laravel-friendly Elastic APM PHP agent for instrumenting apps and sending performance data, errors, and transactions to an Elastic APM Server. Helps monitor response times, slow queries, and exceptions with simple setup and configurable reporting.

View on GitHub
Deep Wiki
Context7

Capture Errors and Exceptions

The agent can capture all types or errors and exceptions that are implemented from the interface Throwable. When capturing an error, you can a context and highly recommended a parent transaction as illustrated in the following snippet.

By doing so you increase the tracability of the error.

// Setup Agent
$config = [
    'serviceName'    => 'examples',
    'serviceVersion' => '1.0.0-beta',
];

$agent = (new \Nipwaayoni\AgentBuilder())
    ->withConfig(new Nipwaayoni\Config($config))
    ->build();

// start a new transaction or use an existing one
$transaction = $agent->startTransaction('Failing-Transaction');

try {
    //
    // do stuff that generates an Exception
    //
}
catch(Exception $e) {
    $agent->captureThrowable($e, [], $transaction);
    // handle Exception ..
}

// do some more stuff ..
$agent->stopTransaction($transaction->getTransactionName());
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours