Need to handle Multi Threading for Manual Instrumentation in Faust Application and How to enable opentracing in Faust

未关闭
#462 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
8/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
observability

调研方向

The issue asks how to keep an OpenTelemetry span context correct across concurrent @app.agent(topic, concurrency=3) handlers, and how to enable tracing in Faust at all. The payload names no source files or tests, so a newcomer would first need to find where Faust's agent concurrency is implemented and whether it exposes a context hook. Done would mean a maintainer-agreed answer or design, not a code change, and the thread has been silent for about three years.

由索引模型根据 Issue 内容生成。

描述

question

Hi Team,

Need help on below problem/implementation for Manual Instrumentation in python for faust streaming application.

Currently on the streaming process we use async to manage concurrency on streaming part which manages the event properly with following code.

@app.agent(topic, concurrency=3)
async def topic_func(topic):
async for event in topic.events():

Now we have started using opentelemetry to span traces for the application. Since Faust doesnt support auto instrumentation yet, we progressed with Manual instrumentation.

For this we are managing and creating context for span in separate library which is outside this async scope and using the same across to create child span on different methods using decorator.

Due to streaming service has concurrency in place which creates multi thread, hence using the context variable which is acting as global variable getting conflicted in multiple threads.

Need to know if there is any existing library which can manage this multi threading and I can use the same context accross to create the child spans.

Also, if possible, could you please also help on , how can I enable opentracing library in faust to enable traces ?

Faust Ver - faust-streaming==0.8.4

Looking forward for the response.

Thanks.
Chirag

主要语言
Python
星标
1.9k
派生
205
平均合并
2 小时 2 分钟
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

faust-streaming/faust 的其他 Issue

查看 faust-streaming/faust 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。