You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general the errors sent to the logger often lack some critical context that would make the source easy to identify.
In our case we have an application that is spinning up consumers for dozens of topics from different components. The following is an example error for a recent issue as received in the logger:
{
"message": "Consumer encountered error while consuming. Retrying. Error details: KafkaJSProtocolError: Broker: Unknown topic or partition : Error: Broker: Unknown topic or partition\n at Function.createLibrdkafkaError [as create] (/Users/peloquina/src/agilysys-inc/stay/backplane-base/node_modules/@confluentinc/kafka-javascript/lib/error.js:459:10)\n at /Users/peloquina/src/agilysys-inc/stay/backplane-base/node_modules/@confluentinc/kafka-javascript/lib/kafka-consumer.js:557:29\n at callbackTrampoline (node:internal/async_hooks:130:17)",
"extras": {
"name": "Confluent#consumer-6",
"fac": "BINDING",
"timestamp": 1736870741813
}
}
If the extras included the topic name in this case, it would have saved hours spent narrowing down which consumer was actually at fault.
The name value seems like it should be a useful cross-reference, but as it a # private field on the consumer it can only be associated with other log entries and is completely inaccessible from within our application.
The text was updated successfully, but these errors were encountered:
Regarding correlation between the consumer and the logs, the name within the consumer is a concatenation of the config's clientId and consumer-$N or producer-N. By setting the clientId, it's possible to recognize which consumer is logging the statement.
Environment Information
Steps to Reproduce
In general the errors sent to the logger often lack some critical context that would make the source easy to identify.
In our case we have an application that is spinning up consumers for dozens of topics from different components. The following is an example error for a recent issue as received in the logger:
If the
extras
included the topic name in this case, it would have saved hours spent narrowing down which consumer was actually at fault.The
name
value seems like it should be a useful cross-reference, but as it a#
private field on the consumer it can only be associated with other log entries and is completely inaccessible from within our application.The text was updated successfully, but these errors were encountered: