Skip to content

Frogger#113

Open
arjtala wants to merge 16 commits intomainfrom
frogger
Open

Frogger#113
arjtala wants to merge 16 commits intomainfrom
frogger

Conversation

@arjtala
Copy link

@arjtala arjtala commented Nov 14, 2025

Why ?

This PR enables frogger2 in Matrix which can be use to log to Scuba/Hive when running on Meta infra. The default fallback is to using the standard logging.Logger

How ?

Install Matrix with the relevant dependancy:

pip install fair-matrix[meta]

Test plan

Devserver:

> pytest tests/integration/utils/test_matrix_logging.py -v
============================================================================= test session starts ==============================================================================
platform linux -- Python 3.11.14, pytest-9.0.1, pluggy-1.6.0 -- /home/arjangt/.conda/envs/frogger/bin/python3.11
cachedir: .pytest_cache
rootdir: /home/arjangt/src/matrix
configfile: pyproject.toml
plugins: anyio-4.11.0, asyncio-1.3.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 15 items                                                                                                                                                             

tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_initialization PASSED                                                               [  6%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_get_logger_returns_matrix_logger_with_forgger PASSED                                              [ 13%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_get_logger_returns_standard_logger_without_frogger PASSED                                         [ 20%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_info_with_frogger PASSED                                                            [ 26%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_info_without_frogger PASSED                                                         [ 33%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_all_levels PASSED                                                                   [ 40%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_handlers PASSED                                                                     [ 46%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_matrix_logger_set_level PASSED                                                                    [ 53%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLogger::test_transmit_handles_exceptions PASSED                                                                [ 60%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerIntegration::test_ray_dashboard_job_logging PASSED                                                       [ 66%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerIntegration::test_logger_with_structured_data PASSED                                                     [ 73%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerWithFrogger::test_transmission PASSED                                                                    [ 80%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerWithFrogger::test_frogger_transmission_with_all_log_levels PASSED                                        [ 86%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerWithFrogger::test_frogger_transmission_with_structured_fields PASSED                                     [ 93%]
tests/integration/utils/test_matrix_logging.py::TestMatrixLoggerWithFrogger::test_verify_local_and_remote_logging_both_occur PASSED                                      [100%]

============================================================================== 15 passed in 2.59s ==============================================================================
SELECT
    FROM_UNIXTIME(time) AS date,
    nodename,
    release,
    duration_seconds,
    num_samples,
    status,
    cluster_scope,
    hashed_username,
    job_id,
    log_level,
    log_message
FROM fair_matrix_events_scuba
ORDER BY time DESC
LIMIT 10

 date                | nodename                     | release                       | duration_seconds | num_samples | status | cluster_scope | hashed_username                                                  | job_id               | log_level | log_message                    
---------------------+------------------------------+-------------------------------+------------------+-------------+--------+---------------+------------------------------------------------------------------+----------------------+-----------+--------------------------------
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | dual_test_001        | INFO      | Dual logging verification test 
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_critical        | CRITICAL  | Critical message               
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_debug           | DEBUG     | Debug message                  
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_error           | ERROR     | Error message                  
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_info            | INFO      | Info message                   
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_warning         | WARNING   | Warning message                
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      1 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_job_123         | INFO      | Integration test message       
 2025-11-19 09:57:25 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |        5000 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | integration_test_456 | INFO      | Structured logging test        
 2025-11-19 09:56:37 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | dual_test_001        | INFO      | Dual logging verification test 
 2025-11-19 09:56:37 | devvm11807.vll0.facebook.com | 6.9.0-0_fbk10_0_gc5fa564d33e3 |                0 |           0 |      0 | local-node    | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_critical        | CRITICAL  | Critical message               

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 14, 2025
"fastgen @ git+https://github.com/dongwang218/fastgen.git"
]
meta = [
"frogger2 @ git+ssh://git@github.com/fairinternal/frogger2.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

this repo is not available for public, right?

@arjtala
Copy link
Author

arjtala commented Nov 19, 2025

Test logs from CoreWeave:

 date                | nodename        | release                                    | duration_seconds | num_samples | status | cluster_scope | hashed_username                                                  | job_id               | log_level | log_message                    
---------------------+-----------------+--------------------------------------------+------------------+-------------+--------+---------------+------------------------------------------------------------------+----------------------+-----------+--------------------------------
 2025-11-19 10:09:20 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | dual_test_001        | INFO      | Dual logging verification test 
 2025-11-19 10:09:20 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |        5000 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | integration_test_456 | INFO      | Structured logging test        
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_critical        | CRITICAL  | Critical message               
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_debug           | DEBUG     | Debug message                  
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_error           | ERROR     | Error message                  
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_info            | INFO      | Info message                   
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_warning         | WARNING   | Warning message                
 2025-11-19 10:09:19 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      1 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | test_job_123         | INFO      | Integration test message       
 2025-11-19 10:09:14 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |           0 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | dual_test_001        | INFO      | Dual logging verification test 
 2025-11-19 10:09:14 | arjangt-login-0 | 6.5.13-65-650-3434-22042-coreweave-amd64-3 |                0 |        5000 |      0 | dm1-control   | bb261073db8b64c7bee79b4c712c5d78a704eb330f10d08647c5703544aa9cf2 | integration_test_456 | INFO      | Structured logging test        

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants