telemetry-ios icon indicating copy to clipboard operation
telemetry-ios copied to clipboard

Document current usage recommendations

Open garvankeeley opened this issue 7 years ago • 4 comments

  1. is not thread-safe, call only from main
  2. is only for CorePing and UI events which are inherently rate-limited by user interaction.

garvankeeley avatar Oct 04 '17 19:10 garvankeeley

Per 1, can we also clarify that the call is non-blocking, so calling from main is relatively safe?

Sdaswani avatar Oct 04 '17 19:10 Sdaswani

Will do, you are correct, all calls are main-thread async. They can result in main thread contention if called at excessive rate.

garvankeeley avatar Oct 04 '17 19:10 garvankeeley

Yeah so we need to change that down the line. It's not good API behavior to expect clients to build their own rate limiting.

Sdaswani avatar Oct 04 '17 20:10 Sdaswani

See also https://github.com/mozilla-mobile/telemetry-ios/issues/12

garvankeeley avatar Oct 04 '17 20:10 garvankeeley