Service Collector
Captures DI container service method calls — invoked service, method, arguments, result, and timing.

What It Captures
| Field | Description |
|---|---|
service | Service identifier |
class | Service class name |
method | Method called |
arguments | Method arguments |
result | Return value |
status | Call status (success or error) |
error | Error message if failed |
timeStart | Call start time |
timeEnd | Call end time |
Data Schema
[
{
"service": "App\\Service\\UserService",
"class": "App\\Service\\UserService",
"method": "findById",
"arguments": [42],
"result": {"id": 42, "name": "John"},
"status": "success",
"error": null,
"timeStart": 1711878000.100,
"timeEnd": 1711878000.105
}
]Summary (shown in debug entry list):
{
"service": {
"total": 5
}
}Contract
use AppDevPanel\Kernel\Collector\ServiceCollector;
use AppDevPanel\Kernel\Event\MethodCallRecord;
$collector->collect(new MethodCallRecord(
service: 'App\\Service\\UserService',
class: 'App\\Service\\UserService',
method: 'findById',
arguments: [42],
result: $result,
status: 'success',
timeStart: $start,
timeEnd: $end,
));INFO
ServiceCollectorAppDevPanel\Kernel\Collector\ServiceCollectorCollects Service data during application lifecycle. implements SummaryCollectorInterfaceAppDevPanel\Kernel\Collector\SummaryCollectorInterfaceSummary data collector responsibility is to collect summary data for a collector. Summary is used to display a list of previous requests and select one to display full info. Its data set is specific to the list and is reduced compared to full data collected in {@see CollectorInterface}. and depends on TimelineCollectorAppDevPanel\Kernel\Collector\TimelineCollectorCollects Timeline data during application lifecycle..
How It Works
The collector is fed by ContainerInterfaceProxyAppDevPanel\Adapter\Yii3\Proxy\ContainerInterfaceProxyDecorator proxy for Container Interface. Intercepts calls and forwards data to collectors. which wraps the PSR-11 ContainerInterfacePsr\Container\ContainerInterfacePSR-11 Container Interface. Describes the interface of a dependency injection container.. When services are resolved and their methods are called through the proxy, the calls are intercepted and recorded.
Debug Panel
- Service call list — all tracked method calls with class, method, and timing
- Expandable details — arguments and return values
- Status indicators — success (green) and error (red) badges