Heroku Telemetry
Last updated December 03, 2024
Table of Contents
Telemetry and observability are crucial for maintaining the health and performance of applications. Heroku’s cloud-native telemetry services make it easy to collect trace, metrics and logs from your application and forward them to archival, observability, and alerting services offered by Heroku’s telemetry add-on partners.
Fir, Heroku’s next generation, leverages OpenTelemetry to provide robust observability features, supporting the OpenTelemetry Protocol (OTLP) for seamless exporting telemetry signals. OpenTelemetry (OTel) has emerged as a standard for collecting telemetry data. OTel is an open-source observability framework. It’s like a toolkit for gathering and understanding data about your software’s performance and behavior. This data, often referred to as telemetry data, includes metrics, logs, and traces.
Heroku Telemetry Drains give you ultimate control over where to send your telemetry. This article describes the benefits of our telemetry tooling.
This feature is only available for Fir-generation apps and spaces.
What Does OpenTelemetry Do?
Instrumentation: It provides tools to add instrumentation to your code, allowing you to capture data about what your software is doing. Generation: It generates telemetry data in a standardized format. Collection: It gathers the generated telemetry data from various parts of your software. Export: It sends the collected data to a backend system for analysis and visualization.
Key Benefits
- Open-Source and Vendor Neutral: OTLP is an open source standard any observability platform can adopt. It’s not tied to any specific vendor, giving you the freedom to choose your preferred tools and platforms.
- Unified Standard: It provides a common protocol to collect and export telemetry data, reducing complexity and improving interoperability.
- Improved Observability: It helps you gain deeper insights into your software’s performance, identify bottlenecks, and troubleshoot issues more effectively.
- Simplify Configuration: It reduces the need for multiple exporters or adapters.
- Unified Logs: Our deep integration with OTel automatically converts your app’s standard output and error logs into OTLP logs.
In essence, OpenTelemetry is becoming the industry standard for instrumenting and collecting telemetry data, helping developers and operations teams better understand and manage their software. To learn more, check out the official OpenTelemetry website, https://opentelemetry.io/
Heroku integrates OpenTelemetry standards natively into the Fir generation of our platform. Unlike a lot of vendors that offer OpenTelemetry integrations, we provide you with deep insights into the entire platform, not just what your application is doing.
In addition to the deep platform integration, we made it easier for you to use off the shelf OpenTelemetry SDKs, reducing the amount of boilerplate setup required to configure your application to emit traces, metrics and logs.
Application and Space-Level Telemetry Drains
This section is a high level overview, for more information see OpenTelemetry Concepts with Heroku
You can set up telemetry drains at the application or space level on Fir. Unlike our legacy generation, Cedar, which made you choose between one or the other, Fir lets you combine telemetry drains for different contexts together.
This flexibility lets you establish global telemetry drains for auditing purposes, while still allowing individual applications to send telemetry signals to different observability backends at the same time.
Telemetry drains are additive. For a Fir space that contains 2 applications, you can configure telemetry drain for that space that applies to both applications. You can also configure each application with its own independent telemetry drain. For example:
heroku telemetry:add --space my-space --endpoint https://sample-audit.com
heroku telemetry:add --app my-app1 --endpoint https://app1-vendor.com
heroku telemetry:add --app my-app2 --endpoint https://app1-vendor.com
- We send the telemetry data from
my-app1
to bothapp1-vendor.com
andsample-audit.com
. - We send the telemetry data from
my-app2
to bothapp2-vendor.com
andsample-audit.com
. - In addition, any new application created within the space automatically gets its telemetry data sent to
sample-audit.com
.
You can configure each telemetry drain to send all supported OpenTelemetry signals, or pick and choose which signals go to which destination. This flexibility makes it easy to send logs to one destination, and your application traces and metrics to another destination.
For example, you may have a high fidelity observability backend to quickly debug incidents and analyze production services. These backends are typically expensive and in order to save costs, you can restrict the retention in this backend to a short period of time. Heroku’s telemetry drains give you the flexibility to send telemetry to a high fidelity observability vendor, while sending the same telemetry data to a lower fidelity long-term storage vendor.
Get Started with Heroku Telemetry Drains
Check out Working with Heroku Telemetry Drains to set up telemetry drains for your Fir-generation apps or spaces. You can also see OpenTelemetry Concepts with Heroku to learn more about our platform integration with OTel.