Skip to content

Generate errors from OpenTelemetry data #31

@AbhiPrasad

Description

@AbhiPrasad

In OpenTelemetry, spans can have exception events.

Let's create Sentry errors from these exception events and send them to Sentry! We can link them to the parent transaction via trace context.

Span span = myTracer.startSpan(/*...*/);
try {
  // Code that does the actual work which the Span represents
} catch (Throwable e) {
  span.recordException(e, Attributes.of("exception.escaped", true));
  throw e;
} finally {
  span.end();
}

The advantage of doing this is that we'll get this working out of the box for users who already have errors instrumented with OpenTelemetry.

### OpenTelemetry Exceptions
- [ ] https://github.com/getsentry/develop/pull/837
- [ ] https://github.com/getsentry/sentry-javascript/pull/7165
- [ ] https://github.com/getsentry/develop/pull/838
- [ ] Python
- [ ] Ruby
- [ ] Java
- [ ] Go
- [ ] Update product to indicate to users that the error event comes from an otel SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    GroomingBacklog Grooming Candidate

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions