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

Always assume device is online on Apple Watch #2005

Conversation

jfiser-paylocity
Copy link
Contributor

What and why?

Workaround for the issue #2004.

On a real Apple Watch device, NWPathMonitor component always returns value of .unsatisfied that results in no logs being ever uploaded to API. As there is no straight-forward replacement for watchOS platform, this PR assumes that Apple Watch device is always online (another solution could be to implement periodic URL check in time interval).

From https://developer.apple.com/documentation/Technotes/tn3135-low-level-networking-on-watchOS:
Capture-2024-08-20-142242

Datadog dashboard logs using the fix:

Simulator Real device
Capture-2024-08-20-141120 Capture-2024-08-20-140535

How?

This PR specifically fixes logs upload by bypassing reachability check in DataUploadConditions.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

@jfiser-paylocity jfiser-paylocity requested review from a team as code owners August 20, 2024 12:24
@maciejburda
Copy link
Member

maciejburda commented Aug 20, 2024

Thanks for opening the PR.

It's one of the considered solutions. We'll be discussing with the team if we see any blockers for disabling reachability for watchOS.

Copy link
Member

@maciejburda maciejburda left a comment

Choose a reason for hiding this comment

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

From my perspective it LGTM.

I was researching this topic and I haven't found a good way to determine reachability on watchOS.

@ncreated @maxep @mariedm Any thoughts?

@maxep maxep changed the base branch from develop to jfiser-paylocity/bugfix/watchos-ignore-reachability-results August 21, 2024 13:47
@maxep
Copy link
Member

maxep commented Aug 21, 2024

Hey @jfiser-paylocity 👋

Thank you very much for your contribution, I'm going to merge it on a feature branch so we can perform more tests. We will ping you when it catch a release train.

@maxep maxep merged commit 45bdc5d into DataDog:jfiser-paylocity/bugfix/watchos-ignore-reachability-results Aug 21, 2024
2 checks passed
@MaelNamNam
Copy link
Contributor

Hi @jfiser-paylocity 👋 Thanks for your contribution, we just released this in version 2.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants