Skip to content

DataCollection phase 2: migrate Sentry.Extensions.AI (GenAI) #5434

Description

@jamescrosswell

Part of #5420. Phase 2 — consumer migration.

Migrate Sentry.Extensions.AI to GenAI.Inputs / GenAI.Outputs:

  • Fold SentryAIOptions.RecordInputs / RecordOutputs (src/Sentry.Extensions.AI/SentryAIOptions.cs:32,38) into the resolved layer — integration-level options take precedence over global DataCollection when explicitly set.
  • SentryAISpanEnricher.cs:30-36 (request messages), :126-143 (response text, tool calls) — read the resolved values.
  • Fix ungated capture: SentryInstrumentedFunction.cs:55 (gen_ai.tool.input) and :22 (gen_ai.tool.output) currently bypass RecordInputs/RecordOutputs entirely.

JS references: getsentry/sentry-javascript#21247, #21287 (AI utils / genAI spans / MCP migrations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeFeatureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions