rcrowe/librato-annotation

v0.1.3 2013-01-24 15:28 UTC

This package is auto-updated.

Last update: 2024-08-29 04:16:45 UTC


README

这个类允许您从PhingLibrato发送注解

我使用这个来标记当我将代码部署到生产服务器时的部署。我可以在仪表板/图表中轻松查看最后一次部署是否影响了性能。

安装

我只测试了通过Composer安装,因此无法保证通过非Composer安装是否能工作。

{
    "require": {
        "rcrowe/librato-annotation": "0.1.2",
        "phing/phing": "2.4.14"
    },
    "minimum-stability": "dev"
}

在构建文件中定义Librato任务

<taskdef name="librato" classname="rcrowe\Librato\AnnotationTask" />

用法

要向Librato发送注解,您需要定义您的用户名和API密钥。您的API密钥可以在您的Librato账户页面找到。

全局设置您的详情

<property name="librato.username" value="hello@vivalacrowe.com" />
<property name="librato.password" value="12345abcdef" />

这样做意味着您只需要做一次,然后可以多次调用Librarto。然而,您也可以直接在行内做这件事

<librato username="hello@vivalacrowe.com" password="12345abcdef" .... />

示例

<librato name="deployment" title="Deployment" desc="Deployed to live" />

如果在尝试向Librarto发送注解时出现错误,默认情况下将继续处理Phing构建文件。您可以使用haltonerror更改此行为

<librato name="deployment" title="Deployment" desc="Deployed to live" haltonerror="true" />