Skip to content

Commit

Permalink
Add comment explaining risk of memory leak if a span is not properly …
Browse files Browse the repository at this point in the history
…ended by the OpenTelemetry instrumentation layer.
  • Loading branch information
tduncan committed Feb 6, 2025
1 parent 3790aa5 commit 2805054
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ public boolean isStartRequired() {
return true;
}

/**
* Relying solely on the OpenTelemetry instrumentation to correctly notify this SpanProcessor when
* a span has ended opens up the possibility of a memory leak in the event a bug is encountered
* within the instrumentation layer that prevents a span from being ended.
*
* <p>Will follow up with a more robust solution to this potential problem.
*/
@Override
public void onEnd(ReadableSpan span) {
if (isEntry(span)) {
Expand Down

0 comments on commit 2805054

Please sign in to comment.