You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Bruno Cadonna (Jira)" <ji...@apache.org> on 2019/11/01 15:32:00 UTC
[jira] [Created] (KAFKA-9129) Add Thread ID to the
InternalProcessorContext
Bruno Cadonna created KAFKA-9129:
------------------------------------
Summary: Add Thread ID to the InternalProcessorContext
Key: KAFKA-9129
URL: https://issues.apache.org/jira/browse/KAFKA-9129
Project: Kafka
Issue Type: Improvement
Components: streams
Reporter: Bruno Cadonna
When we added client metrics we had to move the {{StreamsMetricsImpl}} object to the client level. That means that now instead of having one {{StreamsMetricsImpl}} object per thread, we have now one per client. That also means that we cannot store the thread ID in the {{StreamsMetricsImpl}} anymore. Currently, we get the thread ID from {{Thread.currentThread().getName()}} when we need to create a sensor. However, that is not robust against code refactoring because we need to ensure that the thread that creates the sensor is also the one that records the metrics. To be more flexible, we should expose the ID of the thread that executes a processor in the {{InternalProcessorContext}} like it already exposes the task ID.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)