承接 stikmanw/silex-newrelic 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

stikmanw/silex-newrelic

最新稳定版本:v1.0.0

Composer 安装命令:

composer require stikmanw/silex-newrelic

包简介

Integrate the NewRelic PHP API into Silex framework

README 文档

README

Integrate the NewRelic PHP Agent API into Silex framework.

Acknowledgement

This was originally created by mcuadros. credit goes to him for his hardwork.

Requirements

Versions

This project recently changed hands. See the below updated verions for information on how to require correct dependency.

  • v0.1.0 - Original Repo state used ini settings supported by older versions of NewRelic PHP Agent
  • v1.0.0 - Removed ini settings and replaced with more direct hooks into Intouch/NewRelic library

Installation

The recommended way to install NewRelic/Silex is through composer. You can see the package information on Packagist.

Run composer require to get the latest version:

composer require stikmanw/silex-newrelic

Methods

  • newrelic.custom_parameter ( string $key, $value ): Assign a custom parameter to be captured for the request by NewRelic Agent. Details: NewRelic custom_parameter
  • newrelic.custom_metric (string $name, mixed $value): Assign a metric name and value to be captured by NewRelic Agent. Details: NewRelic custom_metric

Parameters

Set all parameters in the array $app['newrelic.options']:

  • application_name (default 'Silex PHP Application'): Sets the name of the application to name.
  • transaction_name_method (default 'uri'): if 'uri' the request URI will be used as transaction name, if 'route' will be used the alias name from the route.
  • transaction_tracer_detail (default 1): check it at newrelic.transaction_tracer.detail not supported 1.0.0
  • capture_params (default false): determine if the request should capture parameters specified by NewRelic docs. newrelic.capture_params
  • ignored_params (default ''): check it at newrelic.ignored_params not supported 1.0.0
  • disable_auto_rum (default false): Prevents the output filter from attempting to insert RUM JavaScript for this current transaction. Useful for AJAX calls, for example.
  • ignored_transaction (default false): do not send the transaction for tracking to the agent. added 1.0.0 newrelic.ignored_params
  • custom_params (default array()):list of custom params to assign to the request, see custom_params method above. added 1.0.0
  • custom_metrics (default array()): custom metrics to setup when the provider is registered, see custom_metrics method above. added 1.0.0

Registering

$app->register(new NewRelic\Silex\NewRelicServiceProvider());
$app['newrelic.options'] = array(
    'application_name' => 'Example PHP Application',
    'transaction_name_method' => 'route'
);

Tests

Tests are in the tests folder. To run them, you need PHPUnit. Example:

$ phpunit --configuration phpunit.xml.dist

License

MIT, see LICENSE

stikmanw/silex-newrelic 适用场景与选型建议

stikmanw/silex-newrelic 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.69k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2015 年 06 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 stikmanw/silex-newrelic 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 stikmanw/silex-newrelic 我们能提供哪些服务?
定制开发 / 二次开发

基于 stikmanw/silex-newrelic 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 19
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-24