Table of Contents [expand]
Last updated June 30, 2026
For dedicated cluster Apache Kafka on Heroku plans such as standard or extended plans, you can observe Kafka activity within your Heroku app’s log stream. Kafka activity logging isn’t available for basic plans.
Log Format
Kafka logs are visible with heroku logs.
You can filter to see the logs from a specific Apache Kafka on Heroku add-on. Use the --tail option to access real-time log entries.
For Cedar-generation apps:
$ heroku logs -p kafka-animated-39618 -tail -a example-app
For Fir-generation apps:
$ heroku logs -s heroku-kafka -a example-app
Heroku emits log lines from your Kafka cluster with the WARN, ERROR, or FATAL levels to your app’s log stream. These log lines look like this:
2026-06-07T22:46:31+00:00 kafka[kafka-animated-39618.0]: pri=WARN t=ReplicaFetcherThread-0-2 at=ReplicaFetcherThread [ReplicaFetcher replicaId=1, leaderId=2, fetcherId=0] Partition my-example-topic-16 marked as failed
Kafka Metrics
Kafka metrics write to the app’s log stream with the [heroku-kafka] prefix. Metrics emitted for specific brokers in the cluster writes as [heroku-kafka.N], where N is the broker ID of the node responsible for the log line.
$ heroku logs --tail --ps heroku-kafka -a example-app
2026-04-15T14:53:16.000000+00:00 app[heroku-kafka.2]: source=KAFKA addon=kafka-animated-39618 sample#load-avg-1m=0.005 sample#load-avg-5m=0.005 sample#load-avg-15m=0 sample#read-iops=0 sample#write-iops=0.18462 sample#memory-total=16098868kB sample#memory-free=5667652kB sample#memory-percentage-used=0.31930 sample#memory-cached=5290740kB sample#bytes-in-per-second=0.0 sample#bytes-out-per-second=0.0
These metrics apply to individual brokers in your cluster.
sample#bytes-in-per-second: The number of bytes ingested by your cluster per second, including replication traffic between brokers.sample#bytes-out-per-second: The number of bytes output by your cluster per second, including replication traffic between brokers.
Server Metrics
These metrics come directly from the server’s operating system.
sample#load-avg-1m,sample#load-avg-5m, andsample#load-avg-15m: The average system load over a period of 1 minute, 5 minutes, and 15 minutes, divided by the number of available CPUs. A load-avg of 1.0 indicates that, on average, processes were requesting CPU resources for 100% of the timespan. This number includes I/O wait.sample#read-iopsandsample#write-iops: Number of read or write operations in I/O sizes of 16-KB blocks.sample#memory-total: Total amount of server memory in use, in KB. This metric includes memory used by all Kafka processes, OS memory, and disk cache.sample#memory-free: Amount of free memory available in KB.sample#memory-cached: Amount of memory the OS uses for page cache, in KB.- `sample#memory-percentage-used: Percentage of server memory used on the cluster, between 0.0–1.0.