DataDog / dd-sdk-ios

Datadog SDK for iOS - Swift and Objective-C.
Apache License 2.0
219 stars 127 forks source link

`http.useragent` and `version` containing different versions. #1981

Closed msrutek-paylocity closed 3 months ago

msrutek-paylocity commented 3 months ago

Question

We have a lot of logs that have different versions specified in http.useragent and version attributes.

For example, we a log that has

http.useragent: AppName/24.6.0 CFNetwork (iPhone; iOS/17.5.1)

and

version: 24.5.0

which differ in the specified app version 24.6.0 vs 24.5.0.

  1. It feels like the given log was created on app version 24.5.0, the user updated the app to 24.6.0 before it got sent to the server, and only then was the log sent - leading to the discrepancy. Is this the case?
  2. Is this the intended behavior?

Thanks!

maxep commented 3 months ago

Hey @msrutek-paylocity 👋

It feels like the given log was created on app version 24.5.0, the user updated the app to 24.6.0 before it got sent to the server, and only then was the log sent - leading to the discrepancy. Is this the case?

Yes, that's exactly that. We collect events on disk to send them in batches. If the app was updated in between, then the version of the HTTP request is different from the version in the event. That's a limitation of our storage/upload mechanism.

So the version of the log is the one in attributes. I hope this helps!

msrutek-paylocity commented 3 months ago

@maxep Right, thanks for the clarification!