From 51508ce17c5633122ddf3ff93e6d06a4715004db Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 12 Oct 2026 17:19:11 +0200 Subject: [PATCH 1/2] chore(typesafe): Use decide in place of evaluate --- sentry_sdk/consts.py | 1 + sentry_sdk/integrations/typesafe.py | 12 ++++++------ tests/integrations/typesafe/test_typesafe.py | 12 ++++++------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py index 60ad307211..fb6bb534d2 100644 --- a/sentry_sdk/consts.py +++ b/sentry_sdk/consts.py @@ -1341,6 +1341,7 @@ class OP: FUNCTION_GCP = "function.gcp" GEN_AI_CHAT = "gen_ai.chat" GEN_AI_CREATE_AGENT = "gen_ai.create_agent" + GEN_AI_DECIDE = "gen_ai.decide" GEN_AI_EMBEDDINGS = "gen_ai.embeddings" GEN_AI_EVALUATE = "gen_ai.evaluate" GEN_AI_EXECUTE_TOOL = "gen_ai.execute_tool" diff --git a/sentry_sdk/integrations/typesafe.py b/sentry_sdk/integrations/typesafe.py index cea237805b..8d3ea7c356 100644 --- a/sentry_sdk/integrations/typesafe.py +++ b/sentry_sdk/integrations/typesafe.py @@ -216,12 +216,12 @@ def wrap_system_one(self: "TypeSafeClient", *args: "Any", **kwargs: "Any") -> "A model = self._config.default_model with sentry_sdk.start_span( - name=f"evaluate {model}".strip(), + name=f"decide {model}".strip(), attributes={ - "sentry.op": OP.GEN_AI_EVALUATE, + "sentry.op": OP.GEN_AI_DECIDE, "sentry.origin": TypeSafeIntegration.origin, SPANDATA.GEN_AI_PROVIDER_NAME: "typesafe", - SPANDATA.GEN_AI_OPERATION_NAME: "evaluate", + SPANDATA.GEN_AI_OPERATION_NAME: "decide", }, ) as span: if model is not None: @@ -300,12 +300,12 @@ async def wrap_system_one_async( model = self._config.default_model with sentry_sdk.start_span( - name=f"evaluate {model}".strip(), + name=f"decide {model}".strip(), attributes={ - "sentry.op": OP.GEN_AI_EVALUATE, + "sentry.op": OP.GEN_AI_DECIDE, "sentry.origin": TypeSafeIntegration.origin, SPANDATA.GEN_AI_PROVIDER_NAME: "typesafe", - SPANDATA.GEN_AI_OPERATION_NAME: "evaluate", + SPANDATA.GEN_AI_OPERATION_NAME: "decide", }, ) as span: if model is not None: diff --git a/tests/integrations/typesafe/test_typesafe.py b/tests/integrations/typesafe/test_typesafe.py index 8298375a71..fcd5c66f2e 100644 --- a/tests/integrations/typesafe/test_typesafe.py +++ b/tests/integrations/typesafe/test_typesafe.py @@ -105,12 +105,12 @@ def test_system_one(sentry_init, capture_items, typesafe_response): (span,) = ( span for span in spans - if span["attributes"].get("sentry.op") == OP.GEN_AI_EVALUATE + if span["attributes"].get("sentry.op") == OP.GEN_AI_DECIDE ) - assert span["name"] == "evaluate jev-latest" + assert span["name"] == "decide jev-latest" assert span["attributes"][SPANDATA.GEN_AI_PROVIDER_NAME] == "typesafe" - assert span["attributes"][SPANDATA.GEN_AI_OPERATION_NAME] == "evaluate" + assert span["attributes"][SPANDATA.GEN_AI_OPERATION_NAME] == "decide" assert span["attributes"][SPANDATA.GEN_AI_REQUEST_MODEL] == "jev-latest" assert span["attributes"][SPANDATA.GEN_AI_RESPONSE_MODEL] == "jev-latest" @@ -258,12 +258,12 @@ async def test_system_one_async(sentry_init, capture_items, typesafe_response): (span,) = ( span for span in spans - if span["attributes"].get("sentry.op") == OP.GEN_AI_EVALUATE + if span["attributes"].get("sentry.op") == OP.GEN_AI_DECIDE ) - assert span["name"] == "evaluate jev-latest" + assert span["name"] == "decide jev-latest" assert span["attributes"][SPANDATA.GEN_AI_PROVIDER_NAME] == "typesafe" - assert span["attributes"][SPANDATA.GEN_AI_OPERATION_NAME] == "evaluate" + assert span["attributes"][SPANDATA.GEN_AI_OPERATION_NAME] == "decide" assert span["attributes"][SPANDATA.GEN_AI_REQUEST_MODEL] == "jev-latest" assert span["attributes"][SPANDATA.GEN_AI_RESPONSE_MODEL] == "jev-latest" From 95c4085476eb64988f431db712c54f8f3bd2a23c Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Tue, 13 Oct 2026 10:23:05 +0200 Subject: [PATCH 2/2] migration guide call out --- MIGRATION_GUIDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index ee83771dfd..d1f333a3e6 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -43,6 +43,7 @@ Span ops are now a smaller, framework-neutral set. - The OpenAI integration now emits `gen_ai.chat` instead of `gen_ai.responses`. - The Cohere integration now emits `gen_ai.chat` instead of `ai.chat_completions.create.cohere`, and `gen_ai.embeddings` instead of `ai.embeddings.create.cohere`. +- The TypeSafe AI integration now emits `gen_ai.decide` instead of `gen_ai.evaluate`. - The Redis integration now emits `db.query` instead of `db.redis`. - The Django integration now emits `view.render` instead of `view.response.render`, `view` instead of `view.authenticate`, and `function` instead of `event.django`. - The Django, Starlette, Starlite, and Litestar integrations now emit `middleware` instead of `middleware.django`, `middleware.starlette`, `middleware.starlette.receive`, `middleware.starlette.send`, `middleware.starlite`, `middleware.starlite.receive`, `middleware.starlite.send`, `middleware.litestar`, `middleware.litestar.receive`, and `middleware.litestar.send`.