Skip to main content

Mountain/Binary/Build/PostHogPlugin/
CaptureError.rs

1#![allow(non_snake_case)]
2
3//! Convenience wrapper that emits an error event under the
4//! `land:mountain:error` name with `error_tag` + `error_message`. The
5//! Errors & Reliability dashboard rolls these up alongside Cocoon /
6//! Sky errors via a single `event LIKE 'land:%:error'` clause.
7
8use crate::Binary::Build::PostHogPlugin::{CaptureAllowed, CaptureEvent};
9
10pub fn Fn(Tag:&str, Message:&str) {
11	if !CaptureAllowed::Fn() {
12		return;
13	}
14	CaptureEvent::Fn(
15		"land:mountain:error",
16		Some(vec![("error_tag", Tag), ("error_message", Message)]),
17	);
18}