sentry-java
sentry-java copied to clipboard
Move the onFinishCallback before the span is finished
Description
https://github.com/getsentry/sentry-java/pull/3219#discussion_r1500496194
Let's also keep our SpanFrameMetricsCollector in mind, as it's onSpanFinished callback requires the finish date to be already set.
Given that we have a mixed behavior for txn/spans, let's consider this broken and fix it. Let's apply this to both Spans and Transactions.