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

Make tags of SentryScope public #3650

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

birdofpreyru
Copy link
Contributor

@birdofpreyru birdofpreyru commented Feb 18, 2024

📜 Description

See #3649

💡 Motivation and Context

See #3649

💚 How did you test it?

📝 Checklist

You have to check all boxes before merging:

  • 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

@brustolin
Copy link
Contributor

@philipphofmann can you see any problem with this?

@brustolin brustolin linked an issue Feb 19, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f8833c4) 89.211% compared to head (a340071) 89.313%.
Report is 11 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3650       +/-   ##
=============================================
+ Coverage   89.211%   89.313%   +0.102%     
=============================================
  Files          532       534        +2     
  Lines        58710     58981      +271     
  Branches     21077     21171       +94     
=============================================
+ Hits         52376     52678      +302     
+ Misses        5298      5271       -27     
+ Partials      1036      1032        -4     
Files Coverage Δ
Tests/SentryTests/SentryScopeSwiftTests.swift 98.566% <100.000%> (-0.487%) ⬇️

... and 32 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8833c4...a340071. Read the comment docs.

@philipphofmann
Copy link
Member

@philipphofmann can you see any problem with this?

Nope, as this API is also public for other SDKs, but I would change it to

@property (nonatomic, readonly, copy) NSDictionary<NSString *, NSString *> *tags;

so you call it with scope.tags in Swift, instead of scope.tags().

@birdofpreyru, please also add an entry to the changelog, and a test to SentryScopeSwiftTests.

@birdofpreyru
Copy link
Contributor Author

Ok @philipphofmann , I've updated the PR.

Re. the tests, I've just updated existing tag-related tests in SentryScopeSwiftTests to rely on the tags property of the tested scope, rather than using an observer to check on tags. I'd say it gets it covered, no need for a separate test.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM 👍

@philipphofmann philipphofmann changed the title Fixes #3649 Make tags of SentryScope public Feb 20, 2024
@philipphofmann philipphofmann merged commit 0edc74e into getsentry:main Feb 20, 2024
62 of 67 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.

The tags method of SentryScope is not exposed as public
3 participants