Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTEL without Agent - Transaction lost if not bound to scope #3993

Closed
lbloder opened this issue Dec 17, 2024 · 1 comment
Closed

OTEL without Agent - Transaction lost if not bound to scope #3993

lbloder opened this issue Dec 17, 2024 · 1 comment
Labels
Platform: Java Type: Bug Something isn't working

Comments

@lbloder
Copy link
Collaborator

lbloder commented Dec 17, 2024

Integration

sentry-opentelemetry-core

Java Version

17

Version

8.0.0-rc.2

Steps to Reproduce

  • Use the sentry-samples-console-opentelemetry-noagent sample or setup OTEL without agent in a simple java console application
  • Start and finish a transaction without calling makeCurrent
  • To make this more reproducible, also call the garbage collector
ITransaction lostTransaction = Sentry.startTransaction("lost transaction", "op");
System.gc();
lostTransaction.finish();

Expected Result

Transaction is sent to sentry

Actual Result

Transaction is not sent to sentry, because of a WeakReference to an OtelSpan in OtelSpanWrapper, which is garbage collected if not bound to scope

@adinauer
Copy link
Member

Already fixed with PR above.

@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Java Type: Bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants