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
preguntada hace un año456 visualizaciones
2 Respuestas
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
respondido hace un año
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.

respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas