(
props: {
fps: number;
quality: string;
/** Authoring workflow skill that drove this render (e.g. "product-launch-video"). */
authoringSkill?: string;
docker: boolean;
workers?: number;
gpu?: boolean;
source?: "cli" | "studio";
failedStage?: string;
errorMessage?: string;
elapsedMs?: number;
peakMemoryMb?: number;
memoryFreeMb?: number;
// Attribute this event to a specific user (e.g. the browser user who
// triggered a studio render); defaults to the install anonymousId.
distinctId?: string;
} & RenderObservabilityTelemetryPayload,
)
| 206 | } |
| 207 | |
| 208 | export function trackRenderError( |
| 209 | props: { |
| 210 | fps: number; |
| 211 | quality: string; |
| 212 | /** Authoring workflow skill that drove this render (e.g. "product-launch-video"). */ |
| 213 | authoringSkill?: string; |
| 214 | docker: boolean; |
| 215 | workers?: number; |
| 216 | gpu?: boolean; |
| 217 | source?: "cli" | "studio"; |
| 218 | failedStage?: string; |
| 219 | errorMessage?: string; |
| 220 | elapsedMs?: number; |
| 221 | peakMemoryMb?: number; |
| 222 | memoryFreeMb?: number; |
| 223 | // Attribute this event to a specific user (e.g. the browser user who |
| 224 | // triggered a studio render); defaults to the install anonymousId. |
| 225 | distinctId?: string; |
| 226 | } & RenderObservabilityTelemetryPayload, |
| 227 | ): void { |
| 228 | trackEvent( |
| 229 | "render_error", |
| 230 | { |
| 231 | fps: props.fps, |
| 232 | quality: props.quality, |
| 233 | authoring_skill: props.authoringSkill, |
| 234 | docker: props.docker, |
| 235 | workers: props.workers, |
| 236 | gpu: props.gpu, |
| 237 | source: props.source ?? "cli", |
| 238 | failed_stage: props.failedStage, |
| 239 | error_message: props.errorMessage ? redactTelemetryMessage(props.errorMessage) : undefined, |
| 240 | elapsed_ms: props.elapsedMs, |
| 241 | peak_memory_mb: props.peakMemoryMb, |
| 242 | memory_free_mb: props.memoryFreeMb, |
| 243 | ...renderObservabilityEventProperties(props), |
| 244 | }, |
| 245 | props.distinctId, |
| 246 | ); |
| 247 | } |
| 248 | |
| 249 | export function trackRenderObservation(props: { |
| 250 | source?: "cli" | "studio"; |
no test coverage detected