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

sofa-tracer-kafkamq-plugin支持ProducerListener解决方案 #488

Open
keith-java opened this issue Jun 15, 2022 · 1 comment
Open

sofa-tracer-kafkamq-plugin支持ProducerListener解决方案 #488

keith-java opened this issue Jun 15, 2022 · 1 comment
Labels
waiting for feedback waiting for feedback

Comments

@keith-java
Copy link

sofa-tracer-kafkamq-plugin集成到sofa-boot足以满足常规生产/消费,有一种场景现在无法满足,请教一下实现方案

场景:kafka生产者异步回调实现中日志无法关联tracer

代码使用场景:
1、ListenableFuture
2、ProducerListener

如果需要支持以上两种代码的回调实现tracer功能,应该怎么实现

@ujjboy ujjboy transferred this issue from sofastack/sofa-boot Aug 5, 2022
@glmapper
Copy link
Contributor

@keith-java spanContext 的传递在消息场景依赖的是 消息头传递,理论上不管是同步还是异步,只要返回的消息头中存在 spanContext,就可以解析出来,然后塞到 MDC 中去以关联日志,可以尝试从这个思路解决。也欢迎提供 PR 支持此场景

@glmapper glmapper added the waiting for feedback waiting for feedback label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback waiting for feedback
Projects
None yet
Development

No branches or pull requests

2 participants