And I’ll bug you guys one more time…. so I’m doing my own Otel instrumentation for Agno and I’m having trouble getting multiple things to work that both require a “with” clause. I’ve tried nesting them both ways, plus separating the two Context Managers with a comma, but none of it is working:
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span(run_response.run_id) as span, using_attributes(session_id="1234", user_id="adam"):
arize_tracing.trace_span_metadata(span, agent.model.id)
arize_tracing.trace_input_and_messages(span, messages)
arize_tracing.trace_response(span, response, messages[len(messages)-1])
arize_tracing is my own file, but it contains functions based on this tutorial: https://colab.research.google.com/github/Arize-ai/tutorials_python/blob/main/Arize_Tutori[…]Tutorial_Manually_Trace_OpenAI_with_Function_Calls.ipynb