Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Binary/Build/PostHogPlugin/
CaptureIPC.rs

1//! Convenience wrapper for IPC dispatch instrumentation. Emits
2//! `land:mountain:ipc:invoke` with the wire `method` name. Pair with
3//! `CaptureHandler::Fn` to also stamp `land:mountain:handler:complete`
4//! with `duration_ms` once the handler returns.
5
6use crate::Binary::Build::PostHogPlugin::{CaptureAllowed, CaptureEvent};
7
8pub fn Fn(Method:&str) {
9	if !CaptureAllowed::Fn() {
10		return;
11	}
12
13	CaptureEvent::Fn("land:mountain:ipc:invoke", Some(vec![("method", Method)]));
14}