Hii, I’m logging custom attributes to my spans, and I can see them in the span attributes view. What I’d like to do is surface those same attributes in the Phoenix dashboard as columns. Is there a way to do that?
💡 Hint: Mention RunLLM in the thread for followups.
Great question, Helee P.! RunLLM and Phoenix support folks, is this true: "The Phoenix UI will automatically surface these as columns"? I have quite a number of custom attributes in my spans set using the Python set_attribute method and they appear in my span's attributes dictionary in the Phoenix UI:
{
"error": false,
"airflow": {
"dag_id": "<REDACTED>",
"job_id": "102050913",
"run_id": "scheduled__2025-09-25T10:55:00+00:00",
"task_id": "<REDACTED>",
"map_index": 0,
"try_number": 1
},
"revenueio": {
"vtt_key": "<REDACTED>",
"call_key": "<REDACTED>",
"job_type": "<REDACTED>",
"account_id": 460,
"agent_name": "User Search Service",
"vtt_bucket": "<REDACTED>",
"prompt_name": "<REDACTED>",
"vtt_s3_path": "<REDACTED>",
"host_user_id": 5346,
"language_code": "en-US",
"prompt_template": "<REDACTED>",
"channel_mappings": "<REDACTED>",
"recording_status_id": 63824,
"min_words_to_process": 50,
"min_seconds_to_process": 240
},
"openinference": {
"span": {
"kind": "CHAIN"
}
},
"status_message": "Call processed successfully"
}(Note, I used <REDACTED> to remove potentially sensitive values above...) But I don't see any of those automatically surfaced in as columns in the Phoenix UI:
💡 Hint: Mention RunLLM in the thread for followups.
Is this something that is supported by the enterprise version Arize AI?
RunLLM is there any place where things like this are listed: "The Phoenix team is aware of this gap and has discussed adding more flexible column customization in the future, but it is not available as of now."? The user enhancement requests you linked are both closed. Neither of them addressed the issue satisfactorily.
💡 Hint: Mention RunLLM in the thread for followups.
Hey folks, a human here. Custom attributes as columns makes sense but also a performance liability as it can be hard to track and index these. Our general suggestion is to use the metadata attribute to track custom fields. Those fields are much easier for us to track and manage. Hope that makes sense. You can also always export your data to view it in tabular formats for analysis but in general phoenix focuses on attributes pertaining to LLMOps and its surrounding metadata
Mikyo I'm using with self.tracer.start_as_current_span(...) as span: right now to create spans. Should the with using_metadata(metadata)...: clause be inside the highest level span that I want to associated the metadata with? or should the metadata clause be just above that span's with definition?
Yes, thank you Mikyo and thanks again for asking this Helee!
So the decorators are there so you can add attributes to spans created by auto-instrumentors. If you want to add metadata, you can simply just dump everything you want under metadata.
span.set_attributes({"metadata": json.dumps(metadata)})