Skip to content

Commit cd8c23d

Browse files
Update docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry.mdx
Co-authored-by: Stefan Pölz <[email protected]>
1 parent 1cfcbc6 commit cd8c23d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/platforms/dotnet/common/tracing/instrumentation/opentelemetry.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With Sentry’s OpenTelemetry SDK, an OpenTelemetry `Span` becomes a Sentry `Tra
2222

2323
OpenTelemetry in .NET is implemented via the System.Diagnostics.Activity namespace. However not all of the functionality in that namespace is supported by OpenTelemetry. In particular, it is [not recommended](https://github.com/open-telemetry/opentelemetry-specification/pull/4333) that you use the `Activity.RecordException` or `Activity.AddException` methods. Using either of these methods will result in valuable **information being removed from exceptions** before these get captured by Sentry.
2424

25-
Instead you should either log the exceptions (using `ILogger`) or capture the exceptions directly using `Sentry.CaptureException`.
25+
Instead you should either log the exceptions (using `ILogger`) or capture the exceptions directly using `SentrySdk.CaptureException`.
2626

2727
## Additional Configuration
2828

0 commit comments

Comments
 (0)