Skip to content

Conversation

@jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Nov 20, 2025

DESCRIBE YOUR PR

Resolves getsentry/sentry-dotnet#4726

See also:

IS YOUR CHANGE URGENT?

  • Other deadline: Can be released any time before the version 6 release

SLA

cc: @Flash0ver

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sentry-docs Ready Ready Preview Comment Nov 27, 2025 0:05am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
develop-docs Ignored Ignored Preview Nov 27, 2025 0:05am

@codeowner-assignment codeowner-assignment bot requested a review from a team November 20, 2025 02:43
@codecov
Copy link

codecov bot commented Nov 20, 2025

Bundle Report

Changes will decrease total bundle size by 214.05kB (-0.61%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 24.47MB -214.04kB (-0.87%) ⬇️
sentry-docs-client-array-push 10.22MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 893.1kB -0.0%
static/chunks/9366-*.js -3 bytes 436.99kB -0.0%
static/YhtRqrNUPK3WItDKY80ee/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/YhtRqrNUPK3WItDKY80ee/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/lG0LCSBvFGV3QlnkaOGnz/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/lG0LCSBvFGV3QlnkaOGnz/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 5.5MB -0.0%
6529.js -3 bytes 4.92MB -0.0%
../instrumentation.js -3 bytes 4.82MB -0.0%
../app/[[...path]]/page.js.nft.json -71.34kB 952.6kB -6.97%
../app/platform-redirect/page.js.nft.json -71.34kB 952.51kB -6.97%
../app/sitemap.xml/route.js.nft.json -71.34kB 950.04kB -6.99%

.AddSentry() // <-- Configure OpenTelemetry to send traces to Sentry
.AddAspNetCoreInstrumentation() // From OpenTelemetry.Instrumentation.AspNetCore... adds automatic tracing for incoming requests
.AddHttpClientInstrumentation() // From OpenTelemetry.Instrumentation.Http... adds automatic tracing for outgoing HTTP requests
.Build();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: TracerProvider created outside host service collection

The tracerProvider is created as a standalone local variable using using var instead of being registered with the Azure Functions host's service collection. This means the tracer provider won't be accessible to the Azure Functions runtime, and the instrumentation methods like AddAspNetCoreInstrumentation() and AddHttpClientInstrumentation() won't function correctly because they require integration with the host's dependency injection container to intercept requests and responses. The tracer provider should be added through ConfigureServices on the HostBuilder, similar to how ASP.NET Core uses builder.Services.AddOpenTelemetry().

Fix in Cursor Fix in Web

Copy link
Member

@Flash0ver Flash0ver Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code example is (almost) the same as in the sample linked at the bottom of the page

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is yes... that's the point, and the reason for:

If I add the trace builder as a service, as suggested by cursor, we end up with double telemetry for some reason... which is the reason I didn't simply do that.

Copy link
Member

@Flash0ver Flash0ver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there is an issue with the 'performance' product button.
See https://github.com/getsentry/sentry-docs/pull/15568/files#r2565809885.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the Azure Functions guide in the docs to show the _OpenTelemetry_ replacement

3 participants