This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: "Draft"
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA: KAFKA-17027
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
In the code base, there are different formats of metric tags like:
- "broker-id" in BrokerBlockingSender
- "BrokerId" in NodeToControllerChannelManagerImpl
- "clientId" in AbstractFetcherManager
This proposal is to unify metric tag format as lower camel case, because most of places use this format like:
- "networkProcessor" in SockerServer
- "delayedOperation" in DelayedOperation
- "clientSoftwareName" and "clientSoftwareVersion" in RequestChannel
Public Interfaces
- "broker-id" → "brokerId" in ControllerChannelManager, BrokerBlockingSender, ReplicaFetcherBlockingSend, ReplicaVerificationTool, ControllerChannelManager
- "BrokerId" → "brokerId" in NodeToControllerChannelManagerImpl
- "fetcher-id" → "fetcherId" in BrokerBlockingSender, ReplicaFetcherBlockingSend, ReplicaVerificationTool
- "client-id" → "clientId" in KafkaAdminClient, ConsumerMetrics, KafkaProducer, and ProducerMetrics
- "node-id" → "nodeId" in Selector
- "processor-node-id" → "processorNodeId" in StreamsMetricsImpl
- "record-cache-id" → "recordCacheId" in StreamsMetricsImpl
Above changes are found by following code in e2e test:
val pattern = Pattern.compile("^[a-z]+((\\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?$") ManagementFactory.getPlatformMBeanServer.queryNames(null, null).forEach(mbean => { mbean.getKeyPropertyList.forEach((key, _) => { val matcher = pattern.matcher(key) if (!matcher.find()) { println(mbean) } }) })
Proposed Changes
- Use both old and correct metric tag formats in 4.0 and log warning message for old metric tags.
- Remove old metric tag formats after 5.0
Compatibility, Deprecation, and Migration Plan
- Before 4.x, users can keep using deprecated metric tag format.
- After 5.0, users need to update use lower camel case format.
Test Plan
The new unit test used to verify the "warning messages" about deprecated metric tag format will be added. The messages are used to encourage users to adopt the lower camel case format.
Rejected Alternatives
N/A
1 Comment
Matthias J. Sax
PoAn Yang Muralidhar Basani Seems you both picked KIP number 1063. Let make one of both KIP 1064....
Cf KIP-1064: Upgrade slf4j to 2.x