-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
feat: add Sentry screenName tracking #4646
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4646 +/- ##
=========================================
Coverage 90.590% 90.590%
=========================================
Files 620 620
Lines 71075 71118 +43
Branches 25311 25299 -12
=========================================
+ Hits 64387 64426 +39
- Misses 6596 6598 +2
- Partials 92 94 +2
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Sources/Swift/Protocol/SentryViewControllerBreadcrumbTracking.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Dhiogo Brustolin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @m1entus.
LGTM
@@ -9,6 +9,7 @@ | |||
### Features | |||
|
|||
- Show session replay options as replay tags (#4639) | |||
- Add UIViewController custom screenName for breadcrumb tracking (#4642) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it matches the PR number.
- Add UIViewController custom screenName for breadcrumb tracking (#4642) | |
- Add UIViewController custom screenName for breadcrumb tracking (#4646) |
/// UIViewController performance tracker. | ||
/// | ||
@objc | ||
public protocol SentryViewControllerBreadcrumbTracking: NSObjectProtocol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h
: We use SwiftDescriptor getObjectClassName
in multiple locations in our code base for getting the UIViewControllerName; see https://github.com/search?q=repo%3Agetsentry%2Fsentry-cocoa%20SwiftDescriptor%20getObjectClassName&type=code
I think we should use SentryViewControllerBreadcrumbTracking
in all of these scenarios for consistency. Therefore, we should rename this to SentryUIViewControllerName
and update the code comment above accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok i will change, i was thinking about some generic protocol in case in future you would like to add some additional parameters which might be send with breadcrumb. If we name it UIViewControllerName and in future we would like to add additional parameters which might, propably we would have to rename it? What about SentryUIViewControllerDescriptionProviding or SentryUIViewControllerDescriptor ?
Sources/Swift/Protocol/SentryViewControllerBreadcrumbTracking.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Philipp Hofmann <[email protected]>
📜 Description
Added UIViewController custom screenName tracking ref: #4642
💡 Motivation and Context
I used
If viewController responds to
SentryViewControllerBreadcrumbTracking
then usescreenName
instead of[SwiftDescriptor getObjectClassName:controller]
💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps