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

Scope clones the transaction but it should not #1701

Closed
marandaneto opened this issue Sep 7, 2021 · 4 comments
Closed

Scope clones the transaction but it should not #1701

marandaneto opened this issue Sep 7, 2021 · 4 comments
Assignees
Labels
performance Performance API issues

Comments

@marandaneto
Copy link
Contributor

bug introduced in #1496

we have to confirm this behaviour but I am pretty sure it should not

@marandaneto marandaneto added Type: Bug Something isn't working performance Performance API issues labels Sep 7, 2021
@marandaneto
Copy link
Contributor Author

@bruno-garcia can you confirm?

@bruno-garcia
Copy link
Member

Looks like it's not cloning. It copies the reference thouhg:

    this.transaction = scope.transaction;

https://github.com/getsentry/sentry-java/pull/1496/files#diff-9cb115b44ee4c6940b189c33ba24e7b6a168271eefc02f6c0d6c053e75da94c5R83

I believe that's the right thing so that in a server if you push a scope, you can still find the transaction and create children.

@marandaneto
Copy link
Contributor Author

before it was not copying even the reference, that was my point actually, the spec does not say if it should clone or copy the reference or be null, @rhcarvalho maybe?

@marandaneto marandaneto removed the Type: Bug Something isn't working label Sep 13, 2021
@marandaneto
Copy link
Contributor Author

copying the reference is also done by the .NET/Python SDK, so I'll close it.
https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/scope.py#L473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance API issues
Projects
None yet
Development

No branches or pull requests

3 participants