Skip to content

Conversation

@jamescrosswell
Copy link
Collaborator

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Dependencies ⬆️

Deps

  • chore(deps): update Native SDK to v0.12.5 by github-actions in #4892
  • chore(deps): update Native SDK to v0.12.4 by github-actions in #4875
  • build(deps): bump getsentry/github-workflows/sentry-cli/integration-test from 2.14.1 to 3.2.0 by Flash0ver in #4858
  • chore(deps): update Native SDK to v0.12.3 by github-actions in #4832
  • chore(deps): update Java SDK to v8.29.0 by github-actions in #4817

Test

  • chore(test): update PublicApiGenerator from 11.1.0 to 11.5.4 by Flash0ver in #4866
  • chore(test): update FluentAssertions from 6.12.0 to 7.2.0 by Flash0ver in #4864

Other

  • test(integration): prevent auto-relaunch on Android by jpnurmi in #4833
  • feat(metrics): Trace-connected Metrics by Flash0ver in #4834
  • ci(release): Switch from action-prepare-release to Craft by BYK in #4835
  • chore(repo): Add Claude Code settings with basic permissions by philipphofmann in #4850
  • feat: Add support to send OTEL traces via OTLP by jamescrosswell in #4899
  • fix: Apply Enricher to User Feedback by bitsandfoxes in #4883
  • chore: update Roslynator.Analyzers from 4.9.0 to 4.15.0 by Flash0ver in #4878
  • chore: upgrade to C# 14.0 by Flash0ver in #4857
  • fix: Allow Sentry failures when SENTRY_ALLOW_FAILURE is set in the Sentry CLI by DanielMcAssey in #4852
  • chore: bump testing dependencies by Flash0ver in #4865
  • feat: Update error 413 handling by bitsandfoxes in #4863
  • fixed: Thread safety in AssemblyStoreReader when sending events on Android by jamescrosswell in #4814
  • ci: remove trailing slash from workflow references by copilot-swe-agent in #4837
  • feat: Added Main to SentryThread by bitsandfoxes in #4807
  • build: fix Build of Compiler-Extension by Flash0ver in #4804

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Add support to send OTEL traces via OTLP ([#4899](https://github.com/getsentry/sentry-dotnet/pull/4899))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 08d8711

// Finally we configure OpenTelemetry to send traces to Sentry
.AddSentry()
// Finally, we configure OpenTelemetry to send traces to Sentry
.AddSentry(dsn)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is unfortunately a bit more complex for SDK users to initialise because the TracerProviderBuilder.AddOtlpExporter method has no override with an IServiceProvider parameter (so there's no way to read the DSN from the sentry options that get added to the service registry later on).

<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without adding an explicit reference to this package, we get an error because the other packages try to load types from a different assembly version. It's the workaround for this problem basically.

/// </para>
/// </param>
/// <returns>The supplied <see cref="TracerProviderBuilder"/> for chaining.</returns>
public TracerProviderBuilder AddSentry(TextMapPropagator? defaultTextMapPropagator = null)
Copy link
Collaborator Author

@jamescrosswell jamescrosswell Feb 9, 2026

Choose a reason for hiding this comment

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

We could mark this overload obsolete if we wanted to encourage SDK users to move to the OTLP version of the integration... then remove it in a future major release.

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 26.92308% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.78%. Comparing base (48b744f) to head (a2fb0e4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...y.OpenTelemetry/TracerProviderBuilderExtensions.cs 0.00% 21 Missing ⚠️
src/Sentry.OpenTelemetry/OtelPropagationContext.cs 0.00% 8 Missing ⚠️
...rc/Sentry.OpenTelemetry/SentryOptionsExtensions.cs 0.00% 8 Missing ⚠️
src/Sentry/Dsn.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4899      +/-   ##
==========================================
- Coverage   73.87%   73.78%   -0.10%     
==========================================
  Files         494      495       +1     
  Lines       17868    17896      +28     
  Branches     3509     3517       +8     
==========================================
+ Hits        13200    13204       +4     
- Misses       3808     3833      +25     
+ Partials      860      859       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell
Copy link
Collaborator Author

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Odd that we're still seeing this after having moved to conventional commits.

It doesn't look like the danger workflow is aware of our release.yml file or accounts for this in it's logic.

@Flash0ver any ideas what we might be doing wrong?

@Flash0ver
Copy link
Member

@Flash0ver any ideas what we might be doing wrong?

I'm not sure how to remove the Danger Changelog Missing automation off the top of my head ... I'll look into it tomorrow.

return NoOpTransaction.Instance;
}

if (_options.Instrumenter == Instrumenter.OpenTelemetry)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This would be a pretty major change...

  • It would break the Sentry.Extensions.AI integration for a start (we'd need to provide a Sentry.Extensions.AI.OpenTelemetry integration instead).
  • It may break lots of user code that assumes we support mixed instrumentation in a single process (which we did up until now)

Potentially we leave this commented out as a todo for v7.0.0 and we just strongly advise SDK users not to use mixed instrumentation until then as we can't guarantee it will work as expected.

@Flash0ver @dingsdax thoughts?

TracerProviderBuilder traceProviderBuilder,
TextMapPropagator? defaultTextMapPropagator = null
)
public static void UseOpenTelemetry(this SentryOptions options, TracerProviderBuilder builder, TextMapPropagator? textMapPropagator = null)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could add another parameter here disableSentryTracing = false or something like that, which we use later on to determine whether to register integrations that create Sentry tracing etc.

<ItemGroup>
<!-- Version 1.6.0 is the minimum version that does not have trim warnings -->
<PackageReference Include="OpenTelemetry" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.6.0" />
Copy link
Member

Choose a reason for hiding this comment

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

next major: consider bumping to >= 1.11.0, as the dependency graph looks cleaner

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.

Investigate OTLP integration

2 participants