Skip to content
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

setup self-tracing for kafka collector #2872

Open
codefromthecrypt opened this issue Oct 21, 2019 · 0 comments
Open

setup self-tracing for kafka collector #2872

codefromthecrypt opened this issue Oct 21, 2019 · 0 comments
Assignees

Comments

@codefromthecrypt
Copy link
Member

Right now, self-tracing for kafka isn't hooked up. You get a warning like this in the logs once.

setup_grafana_datasource exited with code 22
zipkin                      | 2019-10-21 04:36:28.352  INFO 1 --- [pool-3-thread-1] c.d.d.c.u.UUIDs                          : PID obtained through native call to getpid(): 1
zipkin                      | 2019-10-21 04:36:28.376  WARN 1 --- [pool-3-thread-1] .a.c.b.RequestContextCurrentTraceContext : Attempted to propagate trace context, but no request context available. Did you forget to use RequestContext.contextAwareExecutor() or RequestContext.makeContextAware()?
zipkin                      | 
zipkin                      | com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext$LogRequestContextWarningOnce$NoRequestContextException: null
zipkin                      | 	at com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext$LogRequestContextWarningOnce$ClassLoaderHack.<clinit>(RequestContextCurrentTraceContext.java:289) ~[armeria-brave-0.94.0.jar:?]
zipkin                      | 	at com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext$LogRequestContextWarningOnce.get(RequestContextCurrentTraceContext.java:277) ~[armeria-brave-0.94.0.jar:?]
zipkin                      | 	at com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext$LogRequestContextWarningOnce.get(RequestContextCurrentTraceContext.java:267) ~[armeria-brave-0.94.0.jar:?]
zipkin                      | 	at com.linecorp.armeria.common.RequestContext.mapCurrent(RequestContext.java:108) ~[armeria-0.94.0.jar:?]
zipkin                      | 	at com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext.getRequestContextOrWarnOnce(RequestContextCurrentTraceContext.java:252) ~[armeria-brave-0.94.0.jar:?]
zipkin                      | 	at com.linecorp.armeria.common.brave.RequestContextCurrentTraceContext.get(RequestContextCurrentTraceContext.java:165) ~[armeria-brave-0.94.0.jar:?]
zipkin                      | 	at brave.Tracer.nextSpan(Tracer.java:469) ~[brave-5.8.0.jar:?]
zipkin                      | 	at zipkin2.server.internal.brave.TracedCall.enqueue(TracedCall.java:47) ~[classes/:?]
zipkin                      | 	at zipkin2.collector.Collector.store(Collector.java:201) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.Collector$StoreSpans.run(Collector.java:230) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.Collector.accept(Collector.java:136) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.Collector.accept(Collector.java:109) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.Collector.acceptSpans(Collector.java:191) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.Collector.acceptSpans(Collector.java:172) ~[zipkin-collector-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.kafka.KafkaCollectorWorker.run(KafkaCollectorWorker.java:108) ~[zipkin-collector-kafka-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at zipkin2.collector.kafka.KafkaCollector$LazyKafkaWorkers.lambda$guardFailures$0(KafkaCollector.java:268) ~[zipkin-collector-kafka-2.18.3-SNAPSHOT.jar:?]
zipkin                      | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
zipkin                      | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
zipkin                      | 	at java.lang.Thread.run(Unknown Source) [?:?]
zipkin                      | 

To clear the warning could be as simple as a thread factory same as we have on AsyncReporter. To actually trace would be slightly more work, adding the kafka tracing dep from brave, and excluding it in the slim build.

@jeqo jeqo self-assigned this Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants