server.log — with the OpenTelemetry Collector. The same Collector can also forward traces and metrics from your apps — see Connect OpenTelemetry Collector to Bronto.
This covers the broker’s operational logs, not the commit-log data Kafka stores for topics.
Prerequisites
- A Bronto account and API key (how to create one)
- Kafka brokers writing Log4j logs to disk. The default location is
$KAFKA_HOME/logs/(often/var/log/kafka/), withserver.logas the main broker log - An OpenTelemetry Collector (recommended) or Fluent Bit installed on the same host
Configure the Collector
Kafka stack traces span multiple lines. Usemultiline keyed on the Log4j [timestamp] prefix:
/etc/otel/config.yaml
<REGION> to eu or us.
What you will see in Bronto
Open Search and filter byservice.name = kafka. Entries follow the Log4j pattern — timestamp, level (INFO, WARN, ERROR), logger, and message — covering broker lifecycle, controller and partition events, ISR changes, and exceptions with stack traces (kept intact by the multiline setting). Bronto’s Custom Parser extracts these fields server-side.
Distributed tracing
The Kafka broker does not emit traces — Apache Kafka has no native tracing, so the entries above are the broker’s operational logs only. To trace messages end to end, instrument your producer and consumer applications with the OpenTelemetry SDK: it creates send/receive spans and propagates trace context through Kafka message headers. Point those apps at the same Collector and traces flow to Bronto alongside these logs — see Send Traces to Bronto and the OpenTelemetry SDK guides. On Kubernetes, Strimzi can additionally enable OpenTelemetry tracing for Kafka Connect, MirrorMaker, and the Kafka Bridge.Troubleshooting
- Where are the logs? Check the
kafka.logs.dir/LOG_DIRsetting or the appender file path in yourlog4j.properties, and adjustinclude. - Want structured fields at the source? Configure a Log4j JSON layout for direct field extraction.
- For general issues, see OTel Collector troubleshooting.
Alternative: Fluent Bit
If you already run Fluent Bit, tail the broker log files and forward them over HTTP. The built-injava multiline parser keeps stack traces intact:
fluent-bit.conf
json_lines, not json. See Connect Fluent Bit to Bronto for installation.
