Setting Up Span Attributes for Custom Langchain Retriever Outputs
If Ive made my own langchain runnable that is acting as retriever, how can I set the span output attributes correctly for a retriever? This:
with tracer.start_as_current_span("my custom retriever") as span:
span.set_attribute(SpanAttributes.OPENINFERENCE_SPAN_KIND, "RETRIEVER")
span.set_attribute(SpanAttributes.INPUT_VALUE, question)
context = await self.custom_retriever.ainvoke({"question": question})
span.set_attribute(SpanAttributes.OUTPUT_VALUE, context)Correctly makes it show up as a retriever with the correct input, but no output docs show up in phoenix (I know it works though as later on down the chain I see the docs show up in the final prompt to the generator)
