Send a deployment annotation to Librato using Phing
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Librato Annotations

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.


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" />


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="" />
<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="" password="12345abcdef" .... />


<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" />