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

Add http_request_performed diagnostics event #3897

Merged

Conversation

tonidero
Copy link
Contributor

Description

This adds a new diagnostics event http_request_performed with some useful information we would like to track about the http requests performed to our servers.

@RevenueCat-Danger-Bot
Copy link

RevenueCat-Danger-Bot commented May 15, 2024

1 Message
📖 Size increase: 12.11 KB

Generated by 🚫 Danger

@tonidero tonidero force-pushed the sdk-2907-ios-capture-event-with-http-requestresponse-data branch from 8913f74 to 1817f13 Compare May 15, 2024 08:40
@tonidero tonidero marked this pull request as ready for review May 15, 2024 11:08
@tonidero tonidero requested a review from a team May 15, 2024 11:08
Copy link
Contributor

@jamesrb1 jamesrb1 left a comment

Choose a reason for hiding this comment

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

Looking good!!

@@ -285,7 +285,7 @@ class CustomerInfoManager {

if #available(iOS 15.0, tvOS 15.0, macOS 12.0, watchOS 8.0, *) {
if let tracker = self.diagnosticsTracker, lastSentCustomerInfo != customerInfo {
Task {
Task(priority: .background) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Sources/Networking/HTTPClient/HTTPClient.swift Outdated Show resolved Hide resolved
Sources/Networking/HTTPClient/HTTPClient.swift Outdated Show resolved Hide resolved
wasSuccessful: false,
responseCode: -1,
resultOrigin: nil,
verificationResult: .notRequested)
Copy link
Contributor

Choose a reason for hiding this comment

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

Again unsure on conventions here but .notRequested seems possibly incorrect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the idea here is that upon a network error, the verification doesn't even happen, so we default to .notRequested. We could default to something else to differentiate, but we already have the statusCode property to be able to differentiate those and filter in grafana as needed. We also avoid adding new cardinality to the grafana counters. Lmk if you feel we should have something else though!

@tonidero tonidero enabled auto-merge (squash) May 16, 2024 12:29
@tonidero tonidero merged commit bb8066d into main May 16, 2024
24 checks passed
@tonidero tonidero deleted the sdk-2907-ios-capture-event-with-http-requestresponse-data branch May 16, 2024 13:13
vegaro pushed a commit that referenced this pull request Jun 3, 2024
**This is an automatic release.**

### New Features
* RemoteImage Low Res Image support (#3906) via James Borthwick
(@jamesrb1)
### Bugfixes
* [EXTERNAL] Hide decorative Paywall images from accessibility (#3886)
via @shiftingsand (#3892) via Toni Rico (@tonidero)
### Dependency Updates
* Bump rexml from 3.2.6 to 3.2.8 in
/Tests/InstallationTests/CocoapodsInstallation (#3908) via
dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `dd5e21f` to `8ec0072`
(#3873) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Revert to use xcode 14 to fix deploys (#3929) via Cesar de la Vega
(@vegaro)
* SPMInstallation tests deployment version increase (#3922) via Cesar de
la Vega (@vegaro)
* Only install `swiftlint` on Xcode 15 jobs (#3913) via Josh Holtz
(@joshdholtz)
* Add `http_request_performed` diagnostics event (#3897) via Toni Rico
(@tonidero)
* Paywalls Tester: App Store Prep (#3889) via James Borthwick
(@jamesrb1)
* Paywalls Tester: Enable Example Paywalls in Release Mode (#3885) via
James Borthwick (@jamesrb1)
* Use Ruby 3.2 on CircleCI (#3896) via Josh Holtz (@joshdholtz)
* PaywallsTester: Remove unused code (#3884) via James Borthwick
(@jamesrb1)
* Improved Error Handling (#3883) via James Borthwick (@jamesrb1)
* Clear diagnostics file if we detect it's too big during event tracking
(#3824) via Toni Rico (@tonidero)
* Preprocessor to make select constructs public (#3880) via James
Borthwick (@jamesrb1)
* Paywalls Tester: Use key defined in CI (#3869) via James Borthwick
(@jamesrb1)
* Cleanup: Remove test storekit configuration files when importing
through SPM (#3878) via Andy Boedo (@aboedo)
* Update fastlane plugin and fix docs index path (#3872) via Toni Rico
(@tonidero)
* Update to use xcode 15.3 in CI (#3870) via Cesar de la Vega (@vegaro)
* Paywalls Tester 0.1 (#3868) via James Borthwick (@jamesrb1)
* Update config.yml for SPM repo copy (#3861) via James Borthwick
(@jamesrb1)
* Change deploy-purchase-tester to use xcode 15 (#3858) via Cesar de la
Vega (@vegaro)
nyeu pushed a commit that referenced this pull request Jun 6, 2024
**This is an automatic release.**

### New Features
* RemoteImage Low Res Image support (#3906) via James Borthwick
(@jamesrb1)
### Bugfixes
* [EXTERNAL] Hide decorative Paywall images from accessibility (#3886)
via @shiftingsand (#3892) via Toni Rico (@tonidero)
### Dependency Updates
* Bump rexml from 3.2.6 to 3.2.8 in
/Tests/InstallationTests/CocoapodsInstallation (#3908) via
dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `dd5e21f` to `8ec0072`
(#3873) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Revert to use xcode 14 to fix deploys (#3929) via Cesar de la Vega
(@vegaro)
* SPMInstallation tests deployment version increase (#3922) via Cesar de
la Vega (@vegaro)
* Only install `swiftlint` on Xcode 15 jobs (#3913) via Josh Holtz
(@joshdholtz)
* Add `http_request_performed` diagnostics event (#3897) via Toni Rico
(@tonidero)
* Paywalls Tester: App Store Prep (#3889) via James Borthwick
(@jamesrb1)
* Paywalls Tester: Enable Example Paywalls in Release Mode (#3885) via
James Borthwick (@jamesrb1)
* Use Ruby 3.2 on CircleCI (#3896) via Josh Holtz (@joshdholtz)
* PaywallsTester: Remove unused code (#3884) via James Borthwick
(@jamesrb1)
* Improved Error Handling (#3883) via James Borthwick (@jamesrb1)
* Clear diagnostics file if we detect it's too big during event tracking
(#3824) via Toni Rico (@tonidero)
* Preprocessor to make select constructs public (#3880) via James
Borthwick (@jamesrb1)
* Paywalls Tester: Use key defined in CI (#3869) via James Borthwick
(@jamesrb1)
* Cleanup: Remove test storekit configuration files when importing
through SPM (#3878) via Andy Boedo (@aboedo)
* Update fastlane plugin and fix docs index path (#3872) via Toni Rico
(@tonidero)
* Update to use xcode 15.3 in CI (#3870) via Cesar de la Vega (@vegaro)
* Paywalls Tester 0.1 (#3868) via James Borthwick (@jamesrb1)
* Update config.yml for SPM repo copy (#3861) via James Borthwick
(@jamesrb1)
* Change deploy-purchase-tester to use xcode 15 (#3858) via Cesar de la
Vega (@vegaro)
jamesrb1 pushed a commit that referenced this pull request Jun 19, 2024
**This is an automatic release.**

### New Features
* RemoteImage Low Res Image support (#3906) via James Borthwick
(@jamesrb1)
### Bugfixes
* [EXTERNAL] Hide decorative Paywall images from accessibility (#3886)
via @shiftingsand (#3892) via Toni Rico (@tonidero)
### Dependency Updates
* Bump rexml from 3.2.6 to 3.2.8 in
/Tests/InstallationTests/CocoapodsInstallation (#3908) via
dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `dd5e21f` to `8ec0072`
(#3873) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Revert to use xcode 14 to fix deploys (#3929) via Cesar de la Vega
(@vegaro)
* SPMInstallation tests deployment version increase (#3922) via Cesar de
la Vega (@vegaro)
* Only install `swiftlint` on Xcode 15 jobs (#3913) via Josh Holtz
(@joshdholtz)
* Add `http_request_performed` diagnostics event (#3897) via Toni Rico
(@tonidero)
* Paywalls Tester: App Store Prep (#3889) via James Borthwick
(@jamesrb1)
* Paywalls Tester: Enable Example Paywalls in Release Mode (#3885) via
James Borthwick (@jamesrb1)
* Use Ruby 3.2 on CircleCI (#3896) via Josh Holtz (@joshdholtz)
* PaywallsTester: Remove unused code (#3884) via James Borthwick
(@jamesrb1)
* Improved Error Handling (#3883) via James Borthwick (@jamesrb1)
* Clear diagnostics file if we detect it's too big during event tracking
(#3824) via Toni Rico (@tonidero)
* Preprocessor to make select constructs public (#3880) via James
Borthwick (@jamesrb1)
* Paywalls Tester: Use key defined in CI (#3869) via James Borthwick
(@jamesrb1)
* Cleanup: Remove test storekit configuration files when importing
through SPM (#3878) via Andy Boedo (@aboedo)
* Update fastlane plugin and fix docs index path (#3872) via Toni Rico
(@tonidero)
* Update to use xcode 15.3 in CI (#3870) via Cesar de la Vega (@vegaro)
* Paywalls Tester 0.1 (#3868) via James Borthwick (@jamesrb1)
* Update config.yml for SPM repo copy (#3861) via James Borthwick
(@jamesrb1)
* Change deploy-purchase-tester to use xcode 15 (#3858) via Cesar de la
Vega (@vegaro)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants