You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/01/09 17:04:00 UTC

[jira] [Commented] (KAFKA-9129) Add Thread ID to the InternalProcessorContext

    [ https://issues.apache.org/jira/browse/KAFKA-9129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012048#comment-17012048 ] 

ASF GitHub Bot commented on KAFKA-9129:
---------------------------------------

highluck commented on pull request #7919: KAFKA-9129: Add Thread ID to the InternalProcessorContext
URL: https://github.com/apache/kafka/pull/7919
 
 
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>            Assignee: highluck
>            Priority: Major
>
> 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)