Merged
Conversation
Signed-off-by: mhayes853 <[email protected]>
…shared cactus_telemetry file Signed-off-by: mhayes853 <[email protected]>
Signed-off-by: mhayes853 <[email protected]>
Signed-off-by: mhayes853 <[email protected]>
…on test Signed-off-by: mhayes853 <[email protected]>
Signed-off-by: mhayes853 <[email protected]>
Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]>
Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]>
00fb657 to
bb1482f
Compare
Collaborator
|
I love this PR @mhayes853 it fixed a lot of my concerns with telemetry |
ncylich
pushed a commit
that referenced
this pull request
Feb 24, 2026
* Dedicated telemetry worker Signed-off-by: mhayes853 <[email protected]> * FFIs for flush and shutdown + Move set telemetry environment init to shared cactus_telemetry file Signed-off-by: mhayes853 <[email protected]> * Cleanup tests Signed-off-by: mhayes853 <[email protected]> * Add race test Signed-off-by: mhayes853 <[email protected]> * Remove usage of atomics in favor of global lock + add cloud integration test Signed-off-by: mhayes853 <[email protected]> * Use api key env var Signed-off-by: mhayes853 <[email protected]> * Ensure non-duplicate project ids Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]> * Cleanup + Skip Test if --enable-telemetry not passed to cactus test Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]> --------- Signed-off-by: mhayes853 <[email protected]>
cattermelon1234
pushed a commit
to cattermelon1234/cactus
that referenced
this pull request
Feb 28, 2026
* Dedicated telemetry worker Signed-off-by: mhayes853 <[email protected]> * FFIs for flush and shutdown + Move set telemetry environment init to shared cactus_telemetry file Signed-off-by: mhayes853 <[email protected]> * Cleanup tests Signed-off-by: mhayes853 <[email protected]> * Add race test Signed-off-by: mhayes853 <[email protected]> * Remove usage of atomics in favor of global lock + add cloud integration test Signed-off-by: mhayes853 <[email protected]> * Use api key env var Signed-off-by: mhayes853 <[email protected]> * Ensure non-duplicate project ids Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]> * Cleanup + Skip Test if --enable-telemetry not passed to cactus test Signed-off-by: mhayes853 <[email protected]> Signed-off-by: mhayes853 <[email protected]> --------- Signed-off-by: mhayes853 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now, recording telemetry events blocks the current thread in the FFI to make network calls. This can be unacceptable for concurrency runtimes in languages like in Swift Concurrency where blocking for longer than necessary can potentially starve threads in the cooperative thread pool.
Additionally, applications currently don't have an API to explicitly flush or disable telemetry at this time. The former is useful for uploading when an app backgrounds, and the later is useful if apps want to provide a user-specific setting to opt out of telemetry.
This PR does the following:
recordmethod will now return immediately.cactus_telemetry_flushandcactus_telemetry_shutdownFFIs to give applications control over the telemetry lifecycle. (cactus_telemetry_flushwill block until all enqueued events are processed.)--enable-telemetryis passed tocactus test.cactus_telemetry_bridge.cpp->cactus_telemetry.cppand puts all telemetry related FFIs in there for consistency.