MCPcopy Index your code
hub / github.com/simstudioai/sim / trackPlatformEvent

Function trackPlatformEvent

apps/sim/lib/core/telemetry.ts:439–457  ·  view source on GitHub ↗
(
  eventName: string,
  attributes: Record<string, string | number | boolean>
)

Source from the content-addressed store, hash-verified

437 * Track platform events (workflow creation, knowledge base operations, etc.)
438 */
439export function trackPlatformEvent(
440 eventName: string,
441 attributes: Record<string, string | number | boolean>
442): void {
443 try {
444 const tracer = getTracer()
445 const span = tracer.startSpan(eventName, {
446 attributes: {
447 ...attributes,
448 [TraceAttr.EventName]: eventName,
449 [TraceAttr.EventTimestamp]: Date.now(),
450 },
451 })
452 span.setStatus({ code: SpanStatusCode.OK })
453 span.end()
454 } catch (error) {
455 // Silently fail
456 }
457}
458
459// ============================================================================
460// PLATFORM TELEMETRY EVENTS

Callers 1

telemetry.tsFile · 0.85

Calls 2

startSpanMethod · 0.80
getTracerFunction · 0.70

Tested by

no test coverage detected