Skip to content

Add tracing sqlite db file support so we can connect from python #807

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

benjipelletier
Copy link
Contributor

Summary:
POC of Rust-create sqlite db accessable from native python sqlite connection. This allows us to write python tests that test Monarch and assert user (or BE) events using sql queries.

  • Uses reloadable layer to inject SqliteLayer into tracing registry on demand.
  • Exposes with_tracing_db_file to python to create and get the DB file name so we can connect to

Differential Revision: D79761474

…-pytorch#782)

Summary:

Add a new otel reader type `InMemoryReader`
* impls `ManualReader` and stores global ManualReader instance so we can get metrics during hyperactor program runs.
* provides getters to cumulative counters. Will add more metrics later
* ‼️ Uses cumulative temporality so metrics are stored in the SDK rather than in hyperactor. This might be something we iterate on if collection and transforming to a hashmap each time is too costly


* also changes macros in lib.rs to use $crate eliothedeman

Reviewed By: eliothedeman

Differential Revision: D79658641
Summary:

New tracer subscriber to be used for testing (e.g., script or simulator)
1. New logging layer for use in tests that writes all log messages to a series of sqlite tables
2. Add capability to do sql based assertions for script tests or simulation tests
3. New trace level logging events on actor lifecycle events


Next diffs will:
* Get this working for our PAFT simulator tests so we can easily assert
* Support custom columns

Differential Revision: D73512355
Summary:
POC of Rust-create sqlite db accessable from native python sqlite connection. This allows us to write python tests that test Monarch and assert user (or BE) events using sql queries.
* Uses reloadable layer to inject SqliteLayer into tracing registry on demand.
* Exposes `with_tracing_db_file` to python to create and get the DB file name so we can connect to

Differential Revision: D79761474
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 8, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79761474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants