rcrowe / librato-annotation
Send a deployment annotation to Librato
Requires
- kriswallsmith/buzz: dev-master
- nesquick/metrics: dev-master
- phing/phing: 2.4.*
This package is auto-updated.
Last update: 2024-10-29 04:47:18 UTC
README
This class allows you to send annotations to Librato from Phing
I use this to mark deployments when I put my code onto production servers. I can easily see from my dashboard / graphs if the last deployment has affected performance.
Installation
I have only tested this with installation through Composer, so know guarantees whether this will work not installed through Composer.
{ "require": { "rcrowe/librato-annotation": "0.1.2", "phing/phing": "2.4.14" }, "minimum-stability": "dev" }
Define the the Librato task in your buildfile:
<taskdef name="librato" classname="rcrowe\Librato\AnnotationTask" />
Usage
To send an annotation to Librato you need to define your username and your API key. Your API key can be found on your Librato account page.
Setting your detatils globally:
<property name="librato.username" value="hello@vivalacrowe.com" /> <property name="librato.password" value="12345abcdef" />
Doing it this way means you only have to do it once, and can then call Librarto multiple times. However, you can do this inline as well:
<librato username="hello@vivalacrowe.com" password="12345abcdef" .... />
Example
<librato name="deployment" title="Deployment" desc="Deployed to live" />
If there is an error trying to send the annotation to Librarto the default is to carry on processing the Phing buildfile. You can change this behaviour with haltonerror:
<librato name="deployment" title="Deployment" desc="Deployed to live" haltonerror="true" />