Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(replay-vision): remove the legacy extract-thumbnail rasterizer activity (#113625)

Tue Haulunde7e9c6c0d989
diff --git a/nodejs/src/session-replay/recording-rasterizer/temporal/activities.ts b/nodejs/src/session-replay/recording-rasterizer/temporal/activities.ts
index a5cca72a13ab..e132317e39ad 100644
--- a/nodejs/src/session-replay/recording-rasterizer/temporal/activities.ts
+++ b/nodejs/src/session-replay/recording-rasterizer/temporal/activities.ts
@@ -14,10 +14,9 @@ import { createLogger } from '~/session-replay/recording-rasterizer/logger'
import { RasterizationMetrics } from '~/session-replay/recording-rasterizer/metrics'
import { renderOutputFields } from '~/session-replay/recording-rasterizer/postprocess'
import { uploadToS3 } from '~/session-replay/recording-rasterizer/storage'
-import { extractThumbnail, extractThumbnails } from '~/session-replay/recording-rasterizer/thumbnail'
+import { extractThumbnails } from '~/session-replay/recording-rasterizer/thumbnail'
import {
ActivityTimings,
- ExtractThumbnailInput,
ExtractThumbnailsInput,
RasterizationProgress,
RasterizeRecordingInput,
@@ -246,7 +245,6 @@ export function createActivities(pool: BrowserPool, playerHtml: string) {
return {
'rasterize-recording': (input: RasterizeRecordingInput) => rasterizeRecordingActivity(pool, playerHtml, input),
// No browser and no pool: this one reads an MP4 the rasterizer already produced.
- 'extract-thumbnail': (input: ExtractThumbnailInput) => runMediaActivity(() => extractThumbnail(input)),
'extract-thumbnails': (input: ExtractThumbnailsInput) => runMediaActivity(() => extractThumbnails(input)),
}
}
diff --git a/nodejs/src/session-replay/recording-rasterizer/thumbnail.ts b/nodejs/src/session-replay/recording-rasterizer/thumbnail.ts
index 3b3a0a4fea21..abaf98f87b40 100644
--- a/nodejs/src/session-replay/recording-rasterizer/thumbnail.ts
+++ b/nodejs/src/session-replay/recording-rasterizer/thumbnail.ts
@@ -8,12 +8,7 @@ import { toFiniteNumber } from './capture/config'
import { RasterizationError } from './errors'
import { createLogger } from './logger'
import { downloadFromS3, parseS3Uri, uploadToS3 } from './storage'
-import type {
- ExtractThumbnailInput,
- ExtractThumbnailOutput,
- ExtractThumbnailsInput,
- ExtractThumbnailsOutput,
-} from './types'
+import type { ExtractThumbnailsInput, ExtractThumbnailsOutput } from './types'
const execFileAsync = promisify(execFile)
const log = createLogger()
@@ -290,12 +285,3 @@ export async function extractThumbnails(input: ExtractThumbnailsInput): Promise<
return { frames: extracted }
})
}
-
-/** The single-frame shape of media workflows started before the batch path. Delete once they drain. */
-export async function extractThumbnail(input: ExtractThumbnailInput): Promise<ExtractThumbnailOutput> {
- const { frames } = await extractThumbnails({
- ...input,
- frames: [{ video_time_s: input.video_time_s, id: input.id, required: true }],
- })
- return { s3_uri: frames[0].s3_uri, file_size_bytes: frames[0].file_size_bytes }
-}
diff --git a/nodejs/src/session-replay/recording-rasterizer/types.ts b/nodejs/src/session-replay/recording-rasterizer/types.ts
index d4574e6188a0..05384a2ff254 100644
--- a/nodejs/src/session-replay/recording-rasterizer/types.ts
+++ b/nodejs/src/session-replay/recording-rasterizer/types.ts
@@ -28,25 +28,6 @@ export interface RasterizeRecordingInput {
s3_key_prefix: string // e.g. "exports/mp4/team-123/task-456"
}
-export interface ExtractThumbnailInput {
- /** The rendered analysis MP4 to cut the frame from. */
- source_s3_uri: string
- /** Seconds into the analysis video, which is the time base the model's citations use. */
- video_time_s: number
- /** Pixels of burned-in metadata footer to crop off the bottom before scaling. */
- footer_crop_px?: number
- /** Output width; height follows the source aspect ratio. Defaults to 1280. */
- width?: number
- s3_bucket: string
- s3_key_prefix: string
- id: string
-}
-
-export interface ExtractThumbnailOutput {
- s3_uri: string
- file_size_bytes: number
-}
-
export interface ExtractThumbnailsInput {
/** The rendered analysis MP4 to cut the frames from. */
source_s3_uri: string