Files
pterodactyl-panel/app/Console/Commands/TelemetryCommand.php
T

27 lines
811 B
PHP
Raw Normal View History

2022-11-22 13:39:43 -07:00
<?php
2026-10-05 18:10:18 -04:00
declare(strict_types=1);
2022-11-22 13:39:43 -07:00
namespace Pterodactyl\Console\Commands;
2026-10-05 18:10:18 -04:00
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
2022-11-22 13:39:43 -07:00
use Illuminate\Console\Command;
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
2026-10-05 18:10:18 -04:00
use Symfony\Component\VarDumper\VarDumper;
2022-11-22 13:39:43 -07:00
2026-10-05 18:10:18 -04:00
#[Description('Displays all the data that would be sent to the Pterodactyl Telemetry Service if telemetry collection is enabled.')]
#[Signature('p:telemetry')]
2022-11-22 13:39:43 -07:00
class TelemetryCommand extends Command
{
/**
* Handle execution of command.
*/
2026-10-05 18:10:18 -04:00
public function handle(TelemetryCollectionService $telemetryCollectionService): void
2022-11-22 13:39:43 -07:00
{
$this->output->info('Collecting telemetry data, this may take a while...');
2026-10-05 18:10:18 -04:00
VarDumper::dump($telemetryCollectionService->collect());
2022-11-22 13:39:43 -07:00
}
}