Skip to main content

Mountain/Binary/Build/PostHogPlugin/
CaptureIPC.rs

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