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
Integration
sentry-opentelemetry-core
Java Version
17
Version
8.0.0-rc.2
Steps to Reproduce
sentry-samples-console-opentelemetry-noagentsample or setup OTEL without agent in a simple java console applicationmakeCurrentExpected Result
Transaction is sent to sentry
Actual Result
Transaction is not sent to sentry, because of a
WeakReferenceto anOtelSpaninOtelSpanWrapper, which is garbage collected if not bound to scope