Hi, I'm working on implementing opentelemetry trac...
# prefect-community
Hi, I'm working on implementing opentelemetry traces & metrics for python into my Prefect code. Are there any examples or references for how to structure flows and tasks with them? I was hoping to use state_handlers for referencing the current trace, but doesn't seem to work at all.
Hi @David Beck, I am unfortunately not too familiar with OpenTelemetry and I have not seen examples. I can forward this to someone in the team who knows more but maybe if you show me what you are trying I can help with that. Do you have a code sample?
Well that's the tricky part since I feel like you would need to do a deep on this to understand what I'm asking. Here's the main documentation on the page anyways. I might have an idea for finding a work around, so I will continue to experiment.
Hi David, I'm super hype to hear that you're working on OTel + Prefect. I haven't seen a successful pattern for this yet but I have big hopes and dreams for the future and can't wait to see what you get working
💯 1
@Tyler Wanner thanks for the support! I'm not sure what the best route is going to be at this time; Honestly it will likely be super straightforward and not too hacky from my end. But yes I think Prefect would do well with integrations for OTel in the future!
upvote 1
I would absolutely love to collaborate with you if I wasn't super duper head down on some really exciting upcoming Orion stuff that's occupying 120% of my time. Please keep me updated!!
I just got to play with the OTel Python SDK (I had previously dabbled in the js one) this week and it's 👏 I love what they're doing with that project and definitely want to see more of it in use with Prefect
Hey I'll accept that open invitation at a future date! I would be happy to collaborate and see what we can come up with. But yes I too am feeling the squeeze on some exciting projects at my company, Relativity. If I make any breakthroughs though, I'll be sure to let you know and see about opening a PR.
🙏 1
@David Beck if you have any additional thoughts or ideas about this integration before implementing anything, feel free to add those to this topic (it may be useful. to other users thinking about the same problem and wanting to collaborate)