-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka Streams trace map calls #825
Comments
@jeqo Please correct me if I've described that issue in a wrong way :) |
@artemyarulin thanks for creating the issue. This seems close to what has been discussed in the PR: #800 (comment) We could add |
It's much more explicit comparing to wrapped So I imagine it would look smth like that? val kafkaStreamsTracing = // create KafkaStreamTracing
val builder = StreamsBuilder().apply {
stream(topic)
.transform(kafkaStreamsTracing.mark("start"))
.mapValues { k, v ->
log.info("[1 to 1] Processing $k and $v")
Thread.sleep(1000)
v + 1
}
.transform(kafkaStreamsTracing.mark("after"))
.to(config.topic + "_a", Produced.with(Serdes.String(), Serdes.Long()))
} |
cc @ImFlog |
@jeqo, If we do a |
@ImFlog yes, we'd be falling back to that option. Not sure if we can keep a span "alive" in between "start" -> "processor" -> "end". For those cases I would prefer a wrapper instead: val kafkaStreamsTracing = // create KafkaStreamTracing
val builder = StreamsBuilder().apply {
stream(topic)
.transform(kafkaStreamsTracing.mapValues("map", { k, v ->
log.info("[1 to 1] Processing $k and $v")
Thread.sleep(1000)
v + 1
})
.to(config.topic + "_a", Produced.with(Serdes.String(), Serdes.Long()))
} And |
AFAIR, the threading model doesn't allow us to keep the span alive. |
only problem with liveness is the flush in the PendingSpans class which
sets a timeout. If it is a long stream we may need to adjust this anyway.
There's no problem in general with accessing a span across many threads
except possibly knowing when to stop it.
…On Mon, Nov 19, 2018 at 8:52 PM Florian Garcia ***@***.***> wrote:
AFAIR, the threading model doesn't allow us to keep the span alive.
But yeah, mark for annotation could add some useful information, we wanted
to know if people were interested in this feature, it seems so :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD612BzkilYpUHULAQaAjqlH49tFyctks5uwqmogaJpZM4YaXHt>
.
|
I have an initial draft of a set of operations to add initially to the API: Not sure if other operations as |
StreamsBuilder builder = new StreamsBuilder();
builder.stream(inputTopic, Consumed.with(Serdes.String(), Serdes.String()))
.process(kafkaStreamsTracing.mark("mark-1"));
Topology topology = builder.build();
KafkaStreams streams = buildKafkaStreams(topology); That is beautiful ❤️ Question if I can - how does |
AFAIR, it is a "dot" or a latency close to 0 ns. Also, I think |
@artemyarulin here is a example, were |
… On Mon, 26 Nov 2018, 19:19 Jorge Quilcate Otoya ***@***.*** wrote:
[image: screenshot from 2018-11-26 12-18-47]
<https://user-images.githubusercontent.com/6180701/49011086-85058800-f175-11e8-9ff6-43e909305435.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#825 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD61ziyzvAlWprd5aCEQOMMG25cazU7ks5uy85KgaJpZM4YaXHt>
.
|
Fixed by #833 |
Current Kafka Streams implementation using message headers which is available only in Producer/Tranformer which makes it impossible to build detailed trace of Kafka Streams topologies with different map/filter/reduce/etc steps.
Example output from https://github.com/artemyarulin/kafka-tracing-example looks like that:
After some discussion in Gitter it was suggested that traced
map
may be a good starting point as even with complex topologies developer can always callmap
before/after important operation.The text was updated successfully, but these errors were encountered: