getsentry / getsentry/sentry-javascript

Capture exceptions from OpenTelemetry span events

Ouverte
#16,015 3 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Errors Feature
Langage dominant
TypeScript
Étoiles
8.7k
Forks
1.8k
Merge moyen
1 j 17 h
PR mergées (30 j)
515

Description

### Problem Statement

I would like to request a way to capture exceptions from OpenTelemetry span events as Sentry errors in my NestJS application. Currently, exceptions that occur and are recorded in OpenTelemetry spans are not being converted to Sentry errors, which limits my error tracking capabilities.

According to the SDK documentation (https://develop.sentry.dev/sdk/telemetry/traces/opentelemetry), exceptions from span events should be converted to Sentry errors. I noticed this feature was removed in PR #11221 with a mention that it might return as an opt-in feature in the future.

### Environment
- Sentry SDK version: "@sentry/nestjs": "^9.9.0"
- OpenTelemetry version: "@opentelemetry/sdk-node": "0.57.2", "@opentelemetry/api": "1.9.0"
- Platform/language: Node.js/NestJS

### Solution Brainstorm

I would greatly appreciate if this feature could be reintroduced as an opt-in configuration option. I noticed this functionality is already implemented in the .NET SDK https://github.com/getsentry/sentry-dotnet/blob/762c056ea9102bf93c7dd5c4e0055d661dcf1ec8/src/Sentry.OpenTelemetry/SentrySpanProcessor.cs#L447 , which could perhaps serve as a reference for the JavaScript/Node.js implementation.

An opt-in approach would allow users who need this functionality to enable it while not affecting those who don't require it. This would be incredibly helpful for my error monitoring workflow.

Thank you for considering this request!

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.