Hi everyone, I’m using Phoenix with Google ADK. Does anyone know how I can add attributes or tags to the spans. I’d like to tag my agents with the product features they’re part of for cost summaries
You can add attributes or tags to spans in Phoenix using OpenInference helpers. In Python, use the using_attributes context manager to set custom attributes, tags, or metadata (e.g., product features) on spans. For example: LBKSfrom openinference.instrumentation import using_attributesLBKSwith using_attributes(tags=["feature_x", "feature_y"], metadata={"product_feature": "feature_x"}): # Your agent code here ...LBKSThis will attach the specified tags and metadata to all spans created within the context, making them available for cost summaries and filtering in Phoenix. For more details, see the Phoenix documentation on customizing spans and OpenInference instrumentation.Would you like more detail or examples for a specific language or framework?Sources:
- OpenInference Instrumentation README
💡 Hint: Mention RunLLM in the thread for followups.
That looks right
