aeatech/web-snapshot-profiler-newrelic-bundle
Symfony bundle that integrates Web Snapshot Profiler with New Relic for production-grade request profiling. Configure app name/license and enable profiling selectively per route via headers, request params with probabilities, or profile all routes. Requires PHP 8.2+ and ext-newrelic.
symfony/flex and symfony/bundle integration. A TPM must assess whether the bundle can be adapted or if a Laravel-specific wrapper is needed.ext-newrelic (v12.1+), which is production-grade but requires PHP 8.2+. If the Laravel app already uses New Relic, this bundle adds snapshot-based profiling (likely for granular request analysis).symfony/flex and symfony/bundle installed.config/bundles.php (as shown in README).pecl install newrelic). The bundle extends New Relic’s capabilities rather than replacing it.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony-Laravel Gap | High | Test bundle in a Laravel 10+ sandbox; wrap Symfony services in Laravel facades if needed. |
| New Relic Version | Medium | Verify ext-newrelic compatibility with Laravel’s PHP version (8.2+). |
| Performance Overhead | Medium | Profile bundle’s impact on production traffic (snapshot collection adds latency). |
| Configuration Complexity | Low | Default YAML config is straightforward, but env vars (AEA_TECH_WEB_SNAPSHOT_PROFILER_NEWRELIC_*) must be managed. |
tideways/xhprof, spatie/laravel-profiler) or New Relic’s native Laravel integration. Why choose this bundle?symfony/flex and symfony/bundle are installed (composer require symfony/flex).php artisan config:dump).EventDispatcher, Config, and DependencyInjection. Laravel’s Events and ServiceProvider can bridge gaps.ext-newrelic is installed (php -m | grep newrelic).composer create-project laravel/laravel laravel-sandbox
cd laravel-sandbox
composer require symfony/flex symfony/bundle
composer require aeatech/web-snapshot-profiler-newrelic-bundle
config/bundles.php:
AEATech\WebSnapshotProfilerNewrelicBundle\AEATechWebSnapshotProfilerNewrelicBundle::class => ['all' => true],
.env):
AEA_TECH_WEB_SNAPSHOT_PROFILER_NEWRELIC_APP_NAME=laravel-app
AEA_TECH_WEB_SNAPSHOT_PROFILER_NEWRELIC_LICENSE=your_license_key
KernelEvents), create Laravel event listeners to bridge them.// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->bind(
\AEATech\WebSnapshotProfilerNewrelicBundle\Service\ProfilerService::class,
\App\Services\ProfilerService::class
);
}
config/packages/aea_tech_web_snapshot_profiler_newrelic.yaml:
is_profiling_enabled: true
NewRelic\Agent::getTransaction()->setCustomAttribute()).Symfony\Component\* vs. Laravel’s Illuminate\Support\*).newrelic.ini settings (e.g., newrelic.appname).bundles.php, .env, and YAML config.is_profiling_enabled in production (use feature flags or env vars).App\Events\OrderFailed).GET /api/slow-endpoint).How can I help you explore Laravel packages today?