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

Hubs / Scopes Merge 16 - Move client and throwable to span map to scope #3318

Merged
merged 20 commits into from
Apr 19, 2024

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Apr 4, 2024

#skip-changelog

📜 Description

Move client and throwable to span map to scope.

💡 Motivation and Context

Both shall be on global scope by default.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Apr 4, 2024

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

Generated by 🚫 dangerJS against eeac7f3

@@ -40,10 +36,6 @@ public final class Scopes implements IScopes, MetricsApi.IMetricsInterface {
private final @NotNull SentryOptions options;
private volatile boolean isEnabled;
private final @NotNull TracesSampler tracesSampler;

Copy link
Member Author

Choose a reason for hiding this comment

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

Having a separate map per Scopes will break the feature since it's forked more often than hub used to be (at least for non mobile).

@@ -85,6 +90,11 @@ public final class Scope implements IScope {

private @NotNull ISentryClient client = NoOpSentryClient.getInstance();

// TODO intended only for global scope
// TODO test for memory leak
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs testing once enough changes have been implemented to check for memory leaks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree, we might have to remove the entries that have been sent to Sentry from the map.

But this would have been an issue with Hub as well I think.

@adinauer adinauer changed the title Move client and throwable to span map to scope Hubs / Scopes Merge 16 - Move client and throwable to span map to scope Apr 4, 2024
Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

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

Looks good

@@ -85,6 +90,11 @@ public final class Scope implements IScope {

private @NotNull ISentryClient client = NoOpSentryClient.getInstance();

// TODO intended only for global scope
// TODO test for memory leak
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree, we might have to remove the entries that have been sent to Sentry from the map.

But this would have been an issue with Hub as well I think.

Base automatically changed from feat/hsm-15-scope-storage to 8.x.x April 19, 2024 12:00
@adinauer adinauer merged commit a1bfa95 into 8.x.x Apr 19, 2024
3 of 20 checks passed
@adinauer adinauer deleted the feat/hsm-16-move-client-span-map branch April 19, 2024 12:03
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