Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Troubleshooting Node.js Apps
      • Working with Node.js
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • Working with PHP
      • PHP Behavior in Heroku
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
    • Heroku Inference
      • Inference API
      • Quick Start Guides
      • Inference Essentials
      • AI Models
    • Vector Database
    • Model Context Protocol
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Extending Heroku
  • Heroku Labs
  • Heroku Labs: Dyno Metadata

Heroku Labs: Dyno Metadata

English — 日本語に切り替える

Last updated February 12, 2025

Table of Contents

  • Usage
  • Removal

Dyno metadata gives the dyno easy access to information about the app and environment. Examples of available dyno metadata include details about the release, dyno size, application name as well as the unique identifier for the particular running dyno.

Dyno metadata can be used to:

  • Get release information: Knowing which git SHA of the release your dyno is running is useful for continuous integration, callbacks, and debugging.

  • Easily access the application name: Knowing your application name can make debugging easier when you are running multiple versions of the same application across regions.

Features added through Heroku Labs are experimental and subject to change.

Usage

Dyno processes are able to inspect metadata as config vars set in the dyno. For an app to get these variables, you must first enable the labs feature on the application.

You can enable this feature by running:

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

For additional config vars, enable this flag. See the following table for the config vars available with this flag.

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

The metadata is available the next time you deploy the app.

Dyno Metadata

The following dyno metadata are available:

Name Description Example
HEROKU_APP_ID The unique identifier for the application. "9daa2797-e49b-4624-932f-ec3f9688e3da"
HEROKU_APP_NAME The application name. "example-app"
HEROKU_APP_DEFAULT_DOMAIN_NAME The default DNS hostname for the app. "example-app-1234567890ab.herokuapp.com"
HEROKU_DYNO_ID The dyno identifier. This metadata is not yet available in Private Spaces nor the Container Registry. "1vac4117-c29f-4312-521e-ba4d8638c1ac"
HEROKU_RELEASE_CREATED_AT The time and date the release was created. "2015-04-02T18:00:42Z"
HEROKU_RELEASE_VERSION The identifier for the current release. "v42"
HEROKU_SLUG_COMMIT The commit hash for the current release. This field is deprecated. Use HEROKU_BUILD_COMMIT instead. "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
HEROKU_SLUG_DESCRIPTION The description of the current release. This field is deprecated. Use HEROKU_BUILD_DESCRIPTION instead. "Deploy 2c3a0b2"
HEROKU_BUILD_COMMIT The commit hash for the current build.* "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
HEROKU_BUILD_DESCRIPTION The description of the current build.* "Deploy 2c3a0b2"

Config vars with an asterisk (*) in the description are available with the runtime-dyno-build-metadata flag.

In certain situations, such as pushing a tarball manually using the Releases API, the slug commit hash may be null.

 

It is not recommended that you set HEROKU_* environment variables on your application as it runs the risk of conflicting with these changes.

Example Dyno Metadata

$ env
HEROKU_APP_ID:                   9daa2797-e49b-4624-932f-ec3f9688e3da
HEROKU_APP_NAME:                 example-app
HEROKU_APP_DEFAULT_DOMAIN_NAME:  example-app-1234567890ab.herokuapp.com
HEROKU_DYNO_ID:                  1vac4117-c29f-4312-521e-ba4d8638c1ac
HEROKU_RELEASE_CREATED_AT:       2015-04-02T18:00:42Z
HEROKU_RELEASE_VERSION:          v42
HEROKU_SLUG_COMMIT:              2c3a0b24069af49b3de35b8e8c26765c1dba9ff0
HEROKU_SLUG_DESCRIPTION:         Deploy 2c3a0b2
HEROKU_BUILD_COMMIT:             2c3a0b24069af49b3de35b8e8c26765c1dba9ff0
HEROKU_BUILD_DESCRIPTION:        Deploy 2c3a0b2
...

Removal

If you no longer wish to participate in this lab, please remove the lab from your app and then remove any config vars you may not want. Out of concern for removing config vars that your application may be depending upon, removal of the lab will not remove config vars at this time. As with all labs, this functionality is experimental and may change.

You can disable the continued updating of the config vars by opting out of the lab:

$ heroku labs:disable runtime-dyno-metadata -a <app name>
$ heroku labs:disable runtime-dyno-build-metadata -a <app name>

You can remove the config vars by unsetting any you wish to remove. Here we remove all config vars set by this feature:

$ heroku config:unset HEROKU_APP_ID HEROKU_APP_NAME HEROKU_DYNO_ID \
HEROKU_APP_DEFAULT_DOMAIN_NAME HEROKU_RELEASE_CREATED_AT HEROKU_RELEASE_VERSION \
HEROKU_SLUG_COMMIT HEROKU_SLUG_DESCRIPTION \
HEROKU_BUILD_COMMIT HEROKU_BUILD_DESCRIPTION -a <app name>

Keep reading

  • Heroku Labs

Feedback

Log in to submit feedback.

Heroku Labs: log-runtime-metrics Heroku Labs: log-runtime-metrics

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices