devqaly/devqaly-laravel

此包已被废弃,不再维护。未建议替代包。

允许 Laravel 应用在录制会话时发送事件

v0.1.3 2023-09-01 15:02 UTC

This package is auto-updated.

Last update: 2024-08-30 01:49:56 UTC


README

您录制屏幕,同时 Devqaly 记录重要事件以便更容易和更快地调试

这是终极服务,允许您的开发人员或质量保证工程师在录制屏幕的同时,Devqaly 记录重要信息,例如网络请求、点击、控制台日志、数据库事务等等。


探索文档

安装

您可以通过 composer 安装此包

composer require devqaly/devqaly-laravel

您可以使用以下命令发布配置文件

php artisan vendor:publish --tag="devqaly"

这是发布配置文件的内容

return [
    /*
    |--------------------------------------------------------------------------
    | Source
    |--------------------------------------------------------------------------
    |
    | This value represents where the events are being created. This value is used
    | to show in devqaly's UI where the event was created.
    | If you have a simple api, and a frontend structure, the default value will be enough.
    | If you have a more complex architecture, it is important to give a descriptive name.
    |
    */
    'source' => env('DEVQALY_SOURCE', 'laravel-sdk'),

    /*
    |--------------------------------------------------------------------------
    | Ignored environments
    |--------------------------------------------------------------------------
    |
    | Which environments we should be checking if a session is being recorded or not.
    | You can add multiple environments by separating them by a comma
    | e.g. staging,local
    |
    */
    'runAtEnvironments' => env('DEVQALY_RUN_AT_ENVIRONMENTS', 'staging'),

    /*
    |--------------------------------------------------------------------------
    | Devqaly's backend
    |--------------------------------------------------------------------------
    |
    | This value will tell the package where to send the events to.
    | If you are using the self-hosted version, this is the place
    | for you to add your backend custom URL
    |
    */
    'api' => env('DEVQALY_API_URL', 'https://api.devqaly.com'),

    /*
    |--------------------------------------------------------------------------
    | Events to log
    |--------------------------------------------------------------------------
    |
    | This value indicates which events we should keep track when a session is being recorded.
    | The possible values are databaseTransaction, logs and exceptions.
    |   databaseTransaction: report all SQLs that have been performed during the request
    |   logs: report all logs that were created in the request
    |
    */
    'events' => env('DEVQALY_EVENTS_TO_LOG', 'databaseTransactions,logs'),
    
    /*
    |--------------------------------------------------------------------------
    | Security token
    |--------------------------------------------------------------------------
    |
    | You should be able to see this value in your project's settings page.
    | This value will authenticate your backend in Devqaly's backend servers.
    |
    */
    'securityToken' => env('DEVQALY_SECURITY_TOKEN'),
];

使用方法

您可以按路由或全局注册中间件。我们强烈建议全局注册

// app/Http/Kernel.php

class Kernel extends HttpKernel
{
    protected $middleware = [
        Devqaly\DevqalyLaravel\Middlewares\DevqalyMiddleware::class,
    ];
}

测试

composer test

贡献

有关详细信息,请参阅 CONTRIBUTING

安全漏洞

有关如何报告安全漏洞,请参阅 我们的安全策略

致谢

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件