Refactor FXIOS-11023 [Glean] Use glean wrapper for DefaultShareTelemetry#24231
Closed
aya-en-amir wants to merge 2 commits intomozilla-mobile:mainfrom
aya-en-amir:FXIOS-11023-refactor-DefaultShareTelemetry-with-gleanwrapper
Closed
Refactor FXIOS-11023 [Glean] Use glean wrapper for DefaultShareTelemetry#24231aya-en-amir wants to merge 2 commits intomozilla-mobile:mainfrom aya-en-amir:FXIOS-11023-refactor-DefaultShareTelemetry-with-gleanwrapper
aya-en-amir wants to merge 2 commits intomozilla-mobile:mainfrom
aya-en-amir:FXIOS-11023-refactor-DefaultShareTelemetry-with-gleanwrapper
Conversation
DanielDervishi
approved these changes
Jan 20, 2025
Contributor
DanielDervishi
left a comment
There was a problem hiding this comment.
Great Work Enaya!
|
|
||
| func createSubject() -> ShareTelemetry { | ||
| return DefaultShareTelemetry() | ||
| return DefaultShareTelemetry(gleanWrapper: GleanWrapper) |
Contributor
There was a problem hiding this comment.
Suggested change
| return DefaultShareTelemetry(gleanWrapper: GleanWrapper) | |
| return DefaultShareTelemetry(gleanWrapper: gleanWrapper) |
Just noticed after the fact, we should be passing in the gleanWrapper variable rather than the protocol itself :)
Contributor
There was a problem hiding this comment.
+1 we will want to pass in the mock here
cyndichin
reviewed
Jan 22, 2025
Contributor
cyndichin
left a comment
There was a problem hiding this comment.
looks good! except the one change pointed out by @DanielDervishi. Thank you for making the updates + helping us improve our tests!
Comment on lines
-22
to
-26
| // Due to changes allow certain custom pings to implement their own opt-out | ||
| // independent of Glean, custom pings may need to be registered manually in | ||
| // tests in order to puth them in a state in which they can collect data. | ||
| Glean.shared.registerPings(GleanMetrics.Pings.shared) | ||
| Glean.shared.resetGlean(clearStores: true) |
|
|
||
| func createSubject() -> ShareTelemetry { | ||
| return DefaultShareTelemetry() | ||
| return DefaultShareTelemetry(gleanWrapper: GleanWrapper) |
Contributor
There was a problem hiding this comment.
+1 we will want to pass in the mock here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Tickets
Jira ticket
Github issue
💡 Description
Updated DefaultShareTelemetry + unit tests to use glean wrapper.
📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120)