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

Export Span type for using startInactiveSpan #4345

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

lindboe
Copy link
Contributor

@lindboe lindboe commented Dec 6, 2024

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Export the Span type so projects can use it.

💡 Motivation and Context

When working with startInactiveSpan, I've been writing some utilities to make managing spans easier across separate scopes (e.g., starting a span when a user clicks a button, and ending it when a loading spinner stops, which are in totally separate components. I'd also like to use this to make it easier to use withActiveSpan when I want.)

When doing this I noticed the type for Span was not exported, which I needed to type arguments for my utilities.

💚 How did you test it?

I made the same change in the project I'm working on.

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

Hopefully this one is straightforward and this is it 😄 let me know if you have any questions!

When working with `startInactiveSpan`, I've been writing some utilities to make managing spans easier across separate scopes. When doing this I noticed the type for `Span` was not exported, which I needed to type the arguments to my utilities.
Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @lindboe 🙇
The change looks good 🚀

Please consider adding an entry to the Unreleased section of CHANGELOG.md and we will be happy to merge your fix.

Example:

- Export `Span` type from `@sentry/types` ([#4345](https://github.com/getsentry/sentry-react-native/pull/4345))

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Thank you @lindboe for the contribution!

@krystofwoldrich krystofwoldrich merged commit f54118b into getsentry:main Dec 12, 2024
52 checks passed
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.

3 participants