Instrumenting your SGLang application with Parea AI
integrate_with_sglang()
on the Parea client to automatically instrument any OpenAI calls made through SGLang.
Finally, define a function like run_and_trace
to automatically log the outputs of the SGLang program to Parea and create a trace which associates all LLM calls together.
The following code snippet demonstrates a simple multi-turn question-answering program that logs the outputs of the LLM calls to Parea.