getsentry / getsentry/sentry-dotnet

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

Open
#5,434 1 comment 0 reactions 0 assignees View on GitHub
.NET Feature
Dominant language
C#
Stars
770
Forks
248
Avg merge
2d 22h
Merged PRs (30d)
51

Description

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).

Contributor guide

Open the contributing guide

Research direction

Start with SentryAIOptions.cs at lines 32 and 38, then trace the resolved DataCollection layer and read SentryAISpanEnricher.cs at lines 30-36 and 126-143. Inspect SentryInstrumentedFunction.cs at lines 22 and 55 for the ungated tool attributes; done means the migration uses the resolved values and those captures follow the input/output settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability-sre
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.