platforms / heroku / integrations / dyno-metadata

Heroku Dyno Metadata Integration

Note: This feature requires the use of one of our libraries.

When you enable the Heroku dyno metadata feature for your Heroku application you'll automatically get release and deploy environment variables added to your application's environment. Our libraries automatically pick up these variables andd them as context to your logs.

You'll Get
Release context

How to use it

In your shell run this command:

1
heroku labs:enable runtime-dyno-metadata -a <app name>

How it works

  1. This Heroku features adds the RELEASE_COMMIT, RELEASE_CREATED_AT, and RELEASE_VERSION environment variables (among others).

  2. Our libraries check for the presence of these environment variables and add then as context.

  3. Every log message written within your application will now include the release context:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    {
      "context": {
        "release": {
          "commit_hash": "abcd1234",
          "created_at": "2017-01-01T01:23:24.453345Z",
          "version": "v25"
        }
      }
    }
    
Questions?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up