Aviary
Packages

@dudousxd/nestjs-media-telescope

Telescope watcher that surfaces media events in the observability console.

The observability glue point. A MediaWatcher subscribes to the nestjs:media:* diagnostics channels and records a media entry per milestone — attach / delete / conversion, the resumable upload.start / upload.complete / upload.abort, and attachment.create / attachment.delete — so file activity shows up in the Telescope console alongside your requests, queries, jobs, and mails, correlated under the same batch.

import { MediaWatcher } from '@dudousxd/nestjs-media-telescope';

// register it in your telescope watcher list
TelescopeModule.forRoot({
  watchers: [/* … */ new MediaWatcher()],
});

Zero coupling

The watcher is the only link between media and Telescope, and it's one-directional: media emits to a channel, the watcher listens. Media has no dependency on Telescope, and you can drop the watcher without touching any media code. Call watcher.dispose() to detach the channel subscriptions (e.g. on module destroy).

What you see

Each entry carries the event payload — id, owner, collection, disk, path, size, mime — so you can answer "what did this request upload, and where did it land?" without grepping logs. Conversions appear as their own entries, so a slow first-thumbnail request is visible; resumable uploads show their start and completion. Per-chunk upload.progress is intentionally not recorded — it would flood the timeline on a large upload — but it's still on its channel if you want to consume it yourself.

Alongside the generic diagnostics bridge

Running MediaWatcher next to @dudousxd/nestjs-diagnostics-telescope's generic bridge is safe by default — no manual exclude list required. register() claims every event this watcher records, so the generic bridge skips them automatically and you get exactly one Telescope entry per event, not two. upload.progress stays unclaimed (this watcher doesn't record it either); mute it on the generic bridge yourself with mediaDiagnosticKey('upload.progress') if you don't want it landing there either.

Peer dependencies

@dudousxd/nestjs-telescope (^1) and @dudousxd/nestjs-media-core. See Diagnostics & the glue points for the wider picture.

On this page