-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.9.2
Framework Version
No response
Link to Sentry event
https://prisjakt-ab.sentry.io/performance/trace/962f9a6f5f264f8986da7d9ace318b6f/
SDK Setup
No response
Steps to Reproduce
Due to how
sentry-javascript/packages/opentelemetry/src/spanExporter.ts
Lines 53 to 58 in 1201eb2
if (getLocalParentId(span)) { | |
const openSpanCount = this._finishedSpans.length; | |
DEBUG_BUILD && logger.log(`SpanExporter has ${openSpanCount} unsent spans remaining`); | |
this._cleanupOldSpans(); | |
return; | |
} |
This is what the trace used to look like: https://prisjakt-ab.sentry.io/performance/trace/890f3ee3731e41119416f3964e90719f, this is now: https://prisjakt-ab.sentry.io/performance/trace/962f9a6f5f264f8986da7d9ace318b6f
I understand that this is to avoid leaking memory (makes sense, I guess), but it would be nice to perhaps configure this limit and disable it entirely.
Clearing old spans to avoid memory leak is not really an issue for batch operations that only consist of a single root span and terminate once it's completed anyway.
Furthermore, because of how
sentry-javascript/packages/opentelemetry/src/spanExporter.ts
Lines 174 to 177 in 1201eb2
function shouldCleanupSpan(span: ReadableSpan, maxStartTimeOffsetSeconds: number): boolean { | |
const cutoff = Date.now() / 1000 - maxStartTimeOffsetSeconds; | |
return convertOtelTimeToSeconds(span.startTime) < cutoff; | |
} |
Expected Result
a
Actual Result
a
Metadata
Metadata
Assignees
Labels
Type
Projects
Status