Replies: 2 comments 7 replies
-
Yes, it is possible to programmatically update the annotation on the Additionally, with Arize Phoenix (version 4.20.0 and above), you can attach user feedback to spans and traces in the form of annotations. This involves creating an annotation with fields such as from opentelemetry import trace
import httpx
span = trace.get_current_span()
span_id = span.get_span_context().span_id.to_bytes(8, "big").hex()
client = httpx.Client()
annotation_payload = {
"data": [
{
"span_id": span_id,
"name": "user feedback",
"annotator_kind": "HUMAN",
"result": {"label": "thumbs-up", "score": 1},
"metadata": {},
}
]
}
client.post(
"http://PHOENIX_HOST:PHOENIX_PORT/v1/span_annotations?sync=false",
json=annotation_payload,
) This approach allows you to capture and annotate user feedback on spans, providing valuable insights into application performance and user interactions [1][2]. |
Beta Was this translation helpful? Give feedback.
-
@hristogg Annotating by trace ID is not currently supported in the UI. Alternatively, would it be helpful if you could obtain the span_id of the root span in your workflow? If so, we could add that functionality to the llama-index instrumentor. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am looking for a way to implement capturing end user feedback, however the only possible way I see in the documentation currently is a annotating programmaticaly the span_id through an annotation payload.
However I am ussing llamaindex workflow which generates multiple spans.
I can manage to get the trace_id, however I see no option to programmaticaly update the anontation on the trace_id. Is this possible? The documentation does not seem to mention anything.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions