Create DiagnosticsPostOperation#3795
Conversation
1e2bf4c to
c088873
Compare
c088873 to
30482f3
Compare
tonidero
left a comment
There was a problem hiding this comment.
Just a couple of questions but looking good!
|
|
||
| import Foundation | ||
|
|
||
| typealias DiagnosticsEntries = [String] |
There was a problem hiding this comment.
Oh so the whole body of each event is sent as a string then? We should be careful with encoding characters then, but maybe Body is already taking care of that? (not sure)
There was a problem hiding this comment.
So Body is Encodable and Body has the entries, so I think this should work. But I am going to change it to the way PostAttributionDataOperation works. It stores the data as AnyEncodable instead of [String:Any]
| "request" : { | ||
| "body" : { | ||
| "data" : [ | ||
| "{\n \"properties\": {\"key\": \"value\"},\n \"timestamp\": \"2024-04-04T12:55:59Z\",\n \"name\": \"HTTP_REQUEST_PERFORMED\",\n \"version\": 1\n}", |
There was a problem hiding this comment.
Hmm we should send these as json objects, instead of strings. Maybe we need to process it back to an object after all?
There was a problem hiding this comment.
hmm good point, I hadn't noticed that! Good catch
There was a problem hiding this comment.
Ended up doing a refactor to make the code similar to Paywall Events, and now they are sent as json with the correct date format. lmkwyt
**This is an automatic release.** ### Bugfixes * Prevent Template 4 from wrapping Lifetime (#3789) via Josh Holtz (@joshdholtz) * Add enum entry for external purchases store (#3779) via Mark Villacampa (@MarkVillacampa) ### Dependency Updates * Bump fastlane from 2.219.0 to 2.220.0 (#3783) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Add option to intercept touch events in `PaywallViewController` (#3801) via Toni Rico (@tonidero) * Create DiagnosticsPostOperation (#3795) via Cesar de la Vega (@vegaro) * Add diagnosticsQueue to BackendConfiguration (#3794) via Cesar de la Vega (@vegaro) * Add origin to HTTPResponseType (#3793) via Cesar de la Vega (@vegaro) * Add name property to HTTPRequestPath (#3790) via Cesar de la Vega (@vegaro) * Add name to VerificationResult (#3792) via Cesar de la Vega (@vegaro) * Add HTTPRequest.DiagnosticsPath (#3791) via Cesar de la Vega (@vegaro) * Add async `syncAttributesAndOfferingsIfNeeded()` (#3785) via Josh Holtz (@joshdholtz) * iOS append events to JSONL file and get diagnostics events (#3781) via Cesar de la Vega (@vegaro) * Fix offerings integration test (#3782) via Josh Holtz (@joshdholtz)
Add DiagnosticsPostOperation and DiagnosticsAPI