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

Function build_payload

crates/openshell-core/src/telemetry.rs:370–409  ·  view source on GitHub ↗
(name: &str, event: Value, event_ts: &str, sent_ts: &str)

Source from the content-addressed store, hash-verified

368
369#[cfg(feature = "telemetry")]
370fn build_payload(name: &str, event: Value, event_ts: &str, sent_ts: &str) -> Value {
371 json!({
372 "browserType": "undefined",
373 "clientId": CLIENT_ID,
374 "clientType": "Native",
375 "clientVariant": "Release",
376 "clientVer": client_version(),
377 "cpuArchitecture": std::env::consts::ARCH,
378 "deviceGdprBehOptIn": "None",
379 "deviceGdprFuncOptIn": "None",
380 "deviceGdprTechOptIn": "None",
381 "deviceId": "undefined",
382 "deviceMake": "undefined",
383 "deviceModel": "undefined",
384 "deviceOS": "undefined",
385 "deviceOSVersion": "undefined",
386 "deviceType": "undefined",
387 "eventProtocol": EVENT_PROTOCOL_VERSION,
388 "eventSchemaVer": EVENT_SCHEMA_VERSION,
389 "eventSysVer": EVENT_SYSTEM_VERSION,
390 "externalUserId": "undefined",
391 "gdprBehOptIn": "None",
392 "gdprFuncOptIn": "None",
393 "gdprTechOptIn": "None",
394 "idpId": "undefined",
395 "integrationId": "undefined",
396 "productName": "undefined",
397 "productVersion": "undefined",
398 "sentTs": sent_ts,
399 "sessionId": "undefined",
400 "userId": "undefined",
401 "events": [
402 {
403 "ts": event_ts,
404 "parameters": event,
405 "name": name,
406 }
407 ],
408 })
409}
410
411#[cfg(feature = "telemetry")]
412fn telemetry_sender() -> Option<&'static mpsc::SyncSender<TelemetryEvent>> {

Callers 2

telemetry_workerFunction · 0.85

Calls

no outgoing calls

Tested by 1