Skip to content

feat(mux-tracer): Support JS tracer in MUX tracer.#291

Open
kustrun wants to merge 1 commit intoparadigmxyz:mainfrom
kustrun:feat/support-js-tracer-in-mux-tracer
Open

feat(mux-tracer): Support JS tracer in MUX tracer.#291
kustrun wants to merge 1 commit intoparadigmxyz:mainfrom
kustrun:feat/support-js-tracer-in-mux-tracer

Conversation

@kustrun
Copy link

@kustrun kustrun commented May 13, 2025

Ref: #58

Motivation

Currently muxTracer supports only built-in tracers. It should also support JS tracers.

Dependent on: alloy-rs/alloy#2442

@kustrun kustrun requested review from DaniPopes and mattsse as code owners May 13, 2025 17:45
@kustrun kustrun force-pushed the feat/support-js-tracer-in-mux-tracer branch from 9351f18 to f0f15f7 Compare May 13, 2025 17:52
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool,

for testing you can patch the alloy deps to you branch

I'd still like to keep mux support without the json feature so we need sprinkle some features across this file

/// Mux tracing inspector that runs and collects results of multiple inspectors at once.
#[derive(Clone, Debug)]
#[derive(Debug)]
#[cfg(feature = "js-tracer")]
Copy link
Contributor

Choose a reason for hiding this comment

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

since the fields are private we can simply feature gate the addiiotnal jsInspector here

@kustrun
Copy link
Author

kustrun commented May 14, 2025

@mattsse As suggested, I have added the conditional support for JS tracer in MUX tracer.

@mattsse mattsse force-pushed the feat/support-js-tracer-in-mux-tracer branch from a203c39 to dc890ee Compare January 22, 2026 22:33
Adds support for JS tracers in the MuxInspector:
- Add `code` field and `code()` method to JsInspector to retrieve the JS code
- Change `json_result` and `result` to take a reference to ResultAndState
- Add `js_tracer` field to MuxInspector (feature-gated behind js-tracer)
- Add `MuxConfigExt` type for extended configuration with JS tracers
- Add `try_from_config_ext` and `try_into_mux_frame_ext` methods for JS tracer support
- Add JS tracer calls to all Inspector trait methods in MuxInspector

Closes paradigmxyz#58
@mattsse mattsse force-pushed the feat/support-js-tracer-in-mux-tracer branch from dc890ee to 3480e55 Compare January 22, 2026 22:33
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.

2 participants