>> I'm experimenting on how to add tracing to Kafka Streams. What do you mean by this exactly? Is there a JIRA? I am fine removing `final` from `InternalTopologyBuilder#addProcessor()` -- it's an internal class.
However, the diff also shows > public Topology(final InternalTopologyBuilder internalTopologyBuilder) { This has two impacts: first, it modifies `Topology` what is part of public API and would require a KIP. Second, it exposes `InternalTopologyBuilder` as part of the public API -- something we should not do. I am also not sure, why you want to do this (btw: also public API change requiring a KIP). However, this should not be necessary. > public StreamsBuilder(final Topology topology) { I think I am lacking some context what you try to achieve. Maybe you can elaborate in the problem you try to solve? -Matthias On 9/15/18 10:31 AM, Jorge Esteban Quilcate Otoya wrote: > Hi everyone, > > I'm experimenting on how to add tracing to Kafka Streams. > > One option is to override and access > `InternalTopologyBuilder#addProcessor`. Currently this method it is final, > and builder is not exposed as part of `StreamsBuilder`: > > ``` > public class StreamsBuilder { > > /** The actual topology that is constructed by this StreamsBuilder. */ > private final Topology topology = new Topology(); > > /** The topology's internal builder. */ > final InternalTopologyBuilder internalTopologyBuilder = > topology.internalTopologyBuilder; > > private final InternalStreamsBuilder internalStreamsBuilder = new > InternalStreamsBuilder(internalTopologyBuilder); > ``` > > The goal is that If `builder#addProcessor` is exposed, we could decorate > every `ProcessorSupplier` and capture traces from it: > > ``` > @Override > public void addProcessor(String name, ProcessorSupplier supplier, > String... predecessorNames) { > super.addProcessor(name, new TracingProcessorSupplier(tracer, name, > supplier), predecessorNames); > } > ``` > > Would it make sense to propose this as a change: > https://github.com/apache/kafka/compare/trunk...jeqo:tracing-topology ? or > maybe there is a better way to do this? > TopologyWrapper does something similar: > https://github.com/apache/kafka/blob/trunk/streams/src/test/java/org/apache/kafka/streams/TopologyWrapper.java > > Thanks in advance for any help. > > Cheers, > Jorge. >
signature.asc
Description: OpenPGP digital signature