Skip to content

Conversation

antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Sep 23, 2025

Description

Add spans for input- and output-guardrails defined in OpenAI agents SDK.
Right now the spans have a new op set (gen_ai.guardrail.input or gen_ai.guardrail.output) but the rest of the attributes follows the convention of a tool (because guardrails are kind of a special tool).

One new span attribute is introduced "gen_ai.guardrail.tripwire_triggered" because guardrails is not part of thee OTel Semantic Conventions for AI.

  • Tests are missing to make sure guardrail spans are added correctly and that errors in guardrails are handled properly.

Issues

  • resolves: PY-1703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant