X-Ray Python SDK - threading

0

Hello everyone,

I have wrote an application which opens threads and distributes jobs via a queue (python, subprocess). From reading the docs, which for Java call out this use-case specifically, but not for python, I can't figure out how to make sure that traces created in threads inherit the segments, even if they create they own subsegment, in python. I found some GitHub issues and PRs, all of them closed with no obvious (to me anyways) solutions for people to pick this up.

Hoping someone has found a solution they are happy to solve this issue.

No segment found, cannot begin subsegment localhost.
cannot find the current segment/subsegment, please make sure you have a segment open

Also, follow-up question: there seem to be a big push for using the ADOT libraries. Is that accurate?

profile picture
질문됨 일 년 전456회 조회
2개 답변
0

The Python SDK has some documentation on how to set the trace entity in worker threads, have you tried following this example?

The ADOT libraries use OpenTelemetry which contains a large variety of library instrumentations which are listed here. If you are trying to instrument any of the libraries in this list that may not have instrumentation support in the X-Ray SDK, then ADOT would be a great option to look into!

AWS
Carol_A
답변함 일 년 전
0

X-Ray data model is service-oriented, that drives XRay SDK design: Segment represents a service, is rendered as a node in X-Ray console. So X-Ray sdk user has to wrap subsegment with a segment.

OTel data model is operartion-oriented, OTel SDK is designed as vendor-agnostic, it does not rely on service UX, so it does not force user wrap a span with a service span.

That is just different design philosophy, not the big reason XRay is going to move to OTel. The reason X-Ray support OTel because OTel is a powerful open source project, user can get more contributors' support from community.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠