简体   繁体   English

如何在Zend Framework应用程序中使用StatsD?

[英]How do I use StatsD with Zend Framework application?

In essense I am curious about how other people do that, specifically -- do you wrap StatsD example PHP client in your own class? 从本质上讲,我很好奇其他人如何做到这一点,特别是-您是否在自己的类中包装了StatsD示例PHP客户端? Where to you store configuration for it? 您在哪里存储配置? Any gotchas for using statsd in ZF based application? 在基于ZF的应用程序中使用statsd有任何陷阱吗?

Thank you! 谢谢!

PS: Since I am using both ZF1 and ZF2 this question pertains to both versions of ZF. PS:因为我同时使用ZF1和ZF2,所以这个问题与ZF的两个版本有关。

There are some PHP clients available for Statsd - have a look at http://packagist.org and search for "statsd". 有一些适用于Statsd的PHP客户端-查看http://packagist.org并搜索“ statsd”。 The added benefit is that you'd be able to install anything you select via Composer. 额外的好处是您将能够安装通过Composer选择的任何内容。

How to store configuration is completely up to you and how you are doing it already in your application. 如何存储配置完全取决于您,以及如何在应用程序中完成配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM