MCPcopy
hub / github.com/midrender/revideo / sendEvent

Function sendEvent

packages/telemetry/src/index.ts:49–74  ·  view source on GitHub ↗
(
  eventName: EventName,
  eventProperties: object = {},
)

Source from the content-addressed store, hash-verified

47}
48
49export async function sendEvent(
50 eventName: EventName,
51 eventProperties: object = {},
52) {
53 if (process.env.DISABLE_TELEMETRY === 'true') {
54 return;
55 }
56
57 try {
58 const [version, distinctId] = await Promise.all([
59 getCurrentVersion(),
60 getDistinctId(),
61 ]);
62
63 Client.capture({
64 distinctId,
65 event: eventName,
66 properties: {
67 version,
68 ...eventProperties,
69 },
70 });
71 } catch (e) {
72 // No-op
73 }
74}

Callers 7

renderVideoOnPageFunction · 0.90
index.tsFile · 0.90
handleErrorMethod · 0.90
endMethod · 0.90
runFunction · 0.90
index.jsFile · 0.90
configResolvedFunction · 0.90

Calls 2

getCurrentVersionFunction · 0.85
getDistinctIdFunction · 0.85

Tested by

no test coverage detected