justbetter/magento2-inspectorapm 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

justbetter/magento2-inspectorapm

最新稳定版本:0.1.0

Composer 安装命令:

composer require justbetter/magento2-inspectorapm

包简介

Add Inspector APM support for Magento

README 文档

README

Main Functionalities

Add Inspector APM support for Magento

Installation

Composer

  • Install the module composer by running composer require justbetter/magento2-inspectorapm (--dev)
  • enable the module by running php bin/magento module:enable JustBetter_InspectorApm
  • Flush the cache by running php bin/magento cache:flush

Configuration

add

<?php
return [
    ...
    'inspector_apm' => [
        'ingestion_key' => $_ENV['INSPECTOR_INGESTION_KEY'] ?? '...',
        // Optional, default: https://ingest.inspector.dev
        'url' => $_ENV['INSPECTOR_URL'] ?? 'https://ingest.inspector.dev',
    ],
    ...
]

To your env.php.

Buggregator

If you wish to use buggregator instead of inspector you can set the configuration to

<?php
return [
    ...
    'inspector_apm' => [
        'ingestion_key' => $_ENV['INSPECTOR_INGESTION_KEY'] ?? 'anything-as-its-not-used',
        'url' => $_ENV['INSPECTOR_URL'] ?? 'http://inspector@127.0.0.1:8000',
    ],
    ...
]

In your env.php.

Usage

Database Profiler

Set

<?php
return [
    ...
    'db' => [
        'connection' => [
            'default' => [
                ...
                'profiler' => [
                    'class' => 'JustBetter\\InspectorApm\\Profiler\\Driver\\DbProfiler',
                    'enabled' => true
                ]
            ]
        ]
    ],
    ...

in your env.php to enable the db profiler. This will automatically profile all database transactions.

Magento Profiler

run bin/magento inspector:enable to enable the regular profiler.

This will profile all calls to \Magento\Framework\Profiler::start which you can add in your own code to measure it's performance.

Direct access

If you want to disable all Magento and Zend provided profiling but still want to profile some functions, you can use dependency injection to get "\JustBetter\InspectorApm\Helper\Inspector" and call any of it's underlying functions.

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2024-06-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固