Get started with Release tracking

What is Release tracking?

A release is a collection of commits that is deployed to the app you have set up in Opbeat. Besides the commit list, the release includes contributors, additions and deletions, as well as machines and the time it took to do the release.

How do I use it?

Opbeat uses a simple API to help you track releases. It is most commonly called from Curl. You should notify Opbeat when the release is complete and the new code is effective, i.e. after the app servers are restarted etc.

Curl example

$ cd <local-git-repo>

$ curl https://opbeat.com/api/v1/organizations/<organization-id>/apps/<app-id>/releases/ \
    -H "Authorization: Bearer <secret-token>" \
    -d rev=`git log -n 1 --pretty=format:%H` \
    -d branch=`git rev-parse --abbrev-ref HEAD` \
    -d status=completed

Make sure to replace <organization-id>, <app-id> and <secret-token> with the appropriate values for your app. You can find them under Keys and tokens in your application’s settings.

Other deployment tools

You can also do release tracking with the deployment tools Fabric and Capistrano:

Advanced Usage

In addition to the above, it is also possible to notify Opbeat when individual servers are updated by supplying the machine’s hostname and using status machine-completed:

$ cd <local-git-repo>; curl https://opbeat.com/api/v1/organizations/<organization-id>/apps/<app-id>/releases/ \
-H "Authorization: Bearer <secret-token>" \
-d rev=`git log -n 1 --pretty=format:%H` \
-d branch=`git rev-parse --abbrev-ref HEAD` \
-d machine=`hostname`
-d status=machine-completed

Direct Opbeat API Access

Please refer to the Deployment tracking API documentation for more information.