MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / emit_event

Function emit_event

crates/openshell-core/src/telemetry.rs:453–473  ·  view source on GitHub ↗
(name: &'static str, event: Value)

Source from the content-addressed store, hash-verified

451
452#[cfg(feature = "telemetry")]
453fn emit_event(name: &'static str, event: Value) {
454 if !enabled() {
455 return;
456 }
457 let Some(endpoint) = telemetry_endpoint() else {
458 return;
459 };
460 let Some(sender) = telemetry_sender() else {
461 return;
462 };
463
464 let _ = try_enqueue_event(
465 sender,
466 TelemetryEvent {
467 endpoint,
468 name,
469 event_ts: timestamp(),
470 event,
471 },
472 );
473}
474
475/// Telemetry support is compiled out: emission is a no-op.
476#[cfg(not(feature = "telemetry"))]

Callers 5

emit_lifecycleFunction · 0.85
emit_provider_lifecycleFunction · 0.85
emit_sandbox_createFunction · 0.85
emit_policy_decisionFunction · 0.85

Calls 5

enabledFunction · 0.85
telemetry_endpointFunction · 0.85
telemetry_senderFunction · 0.85
try_enqueue_eventFunction · 0.85
timestampFunction · 0.85

Tested by

no test coverage detected