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
Inspector Php

Inspector Php Laravel Package

inspector-apm/inspector-php

Inspector APM PHP agent: instrument your Laravel/PHP apps to collect traces, transactions, errors, and performance metrics. Lightweight integration, configurable sampling and context, helps you find slow requests and production issues fast.

View on GitHub
Deep Wiki
Context7

Connect your PHP application to Inspector monitoring dashboard.

Frequently asked questions about Inspector Php
How do I integrate Inspector APM into a Laravel application with minimal setup?
Add Inspector’s middleware to your Laravel `app/Http/Kernel.php` via `$this->middleware(InspectorMiddleware::class)` to auto-track HTTP requests. Initialize the agent with your ingestion key in a service provider’s boot method. No additional configuration is needed for basic tracing.
Does Inspector APM support Laravel’s Eloquent ORM and database queries?
Yes, Inspector automatically instruments Eloquent queries when used with middleware. For granular control, wrap queries in `Inspector::span()` to manually track database performance. This works seamlessly with Laravel’s query builder and raw SQL.
What Laravel versions and PHP requirements does Inspector APM support?
Inspector APM requires PHP 8.1+. It works with Laravel 9+ (PHP 8.1+) and Laravel 10/11 (PHP 8.2+). Check your Laravel version’s PHP compatibility first, as older versions may not support the required PHP features.
Can I use Inspector APM for Laravel queue workers and async jobs?
Yes, Inspector supports Laravel queues and async workers. Use `Inspector::fork()` to handle process forking (e.g., in queue workers) to avoid corrupted trace hierarchies. This ensures traces propagate correctly across worker processes.
How does Inspector APM handle performance overhead in production?
Inspector adds minimal overhead (~1-3% latency) for basic tracing. For high-traffic apps, use `Inspector::setSamplingRate()` to reduce data volume. Custom spans or heavy instrumentation may require sampling to maintain performance.
Does Inspector APM support OpenTelemetry or other APM tools?
Inspector APM is not natively OpenTelemetry-compatible, but you can export data via custom transport. If using other APM tools (e.g., Datadog, New Relic), ensure no conflicts with Inspector’s auto-instrumentation or global handlers.
How do I filter sensitive data (e.g., API keys, user tokens) from traces?
Use `Inspector::setFilter()` to redact sensitive data in spans or transactions. For example, filter out request payloads or environment variables containing PII. This prevents accidental exposure in the Inspector dashboard.
Can I self-host Inspector APM or use a custom collector?
Yes, Inspector supports pure-PHP mode with custom transports. Implement `TransportInterface` to forward data to your own collector (e.g., a self-hosted OpenTelemetry endpoint). This avoids sending data to Inspector’s cloud but requires manual setup.
What are the alternatives to Inspector APM for Laravel monitoring?
Alternatives include New Relic, Datadog APM, and open-source tools like OpenTelemetry PHP. New Relic and Datadog offer broader integrations but may have higher costs. OpenTelemetry provides vendor neutrality but requires more configuration.
How do I correlate traces across microservices (e.g., Laravel + Node.js) in Inspector?
Inspector automatically propagates context (e.g., request IDs) via headers. Ensure all services (Laravel, Node.js, etc.) use the same context format. In Laravel, rely on middleware to inject headers; in other services, manually set `X-Request-ID` or similar.
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.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin