Skip to content

Memory leak with unclosed span in opentelemetry integration #2722

Closed
@vanchaxy

Description

@vanchaxy

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.40.3

Steps to Reproduce

SentrySpanProcessor stores all open span in self.otel_span_map dict. This leads to a memory leak if otel span is deleted without closing. E.g. due to a bug: open-telemetry/opentelemetry-python-contrib#2149

Expected Result

Sentry span should be deleted after otel span is deleted by GC.

Actual Result

Sentry spans are stored in self.otel_span_map forever.

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions