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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Hub.getSpan instead of Sentry.getSpan #535

Closed
wants to merge 4 commits into from

Conversation

markushi
Copy link
Member

馃摐 Description

Switch from Sentry.getSpan() to HubAdapter.getInstance().getTransaction() / getSpan() eventually.

馃挕 Motivation and Context

getsentry/sentry-java#2855
getsentry/sentry-java#1828

馃挌 How did you test it?

馃摑 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

馃敭 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Messages
馃摉 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 馃毇 dangerJS against b6c001c

ISpan child = null;
if (span != null) {
child = span.startChild("db", <description>);
}
*/
protected fun MethodVisitor.visitStartSpan(
attachToRoot: Boolean,
Copy link
Member Author

@markushi markushi Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need this flag. But in theory we could always attach the room spans to the root and the sqlite spans to the last active span

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think I'd just do that without the flag

@markushi markushi changed the title Add basic support for attaching spans to root / last active span Use Hub.getSpan instead of Sentry.getSpan Aug 4, 2023
@markushi markushi marked this pull request as ready for review August 4, 2023 05:24
@romtsn
Copy link
Member

romtsn commented Sep 7, 2023

Closing as Sentry.getSpan() will return the root transaction on Android by default now, so this PR is not needed

@romtsn romtsn closed this Sep 7, 2023
@romtsn romtsn deleted the feat/use-hub-get-span branch October 11, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants