---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/functions/emitIsolationReport.md'
---

# Function: emitIsolationReport()

```ts
function emitIsolationReport(
  hooks: IsolationObservabilityHooks | undefined,
  phase: IsolationReportPhase,
  base: {
    serviceName?: string;
    spawnCount: number;
  },
  extra?: Omit<
    Partial<IsolationReport>,
    "at" | "phase" | "serviceName" | "spawnCount"
  >,
  now?: () => string,
): void;
```

Defined in: [src/batteries/isolation/observability.ts:201](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L201)

Build an [IsolationReport](../interfaces/IsolationReport.md) (stamping `at`) and dispatch it to the firehose
([IsolationObservabilityHooks.onIsolation](../interfaces/IsolationObservabilityHooks.md#property-onisolation)) AND the per-phase-group hook for `phase`. A no-op
when `hooks` is undefined or carries no relevant callbacks — callers should additionally guard
expensive `extra` computation (e.g. `approxBytes` sizing) behind [hasIsolationHook](hasIsolationHook.md) so it is
never computed when unhooked. Each callback is invoked through safeInvoke, so a throwing
consumer never disrupts the battery.

## Parameters

| Parameter           | Type                                                                                                                                                                                                                                                                                                   | Description                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| `hooks`             | | [`IsolationObservabilityHooks`](../interfaces/IsolationObservabilityHooks.md) | `undefined`                                                                                                                                                                                                        | The isolation observability hooks (may be undefined).                            |
| `phase`             | [`IsolationReportPhase`](../type-aliases/IsolationReportPhase.md)                                                                                                                                                                                                                                      | The phase being reported.                                                        |
| `base`              | { `serviceName?`: `string`; `spawnCount`: `number`; }                                                                                                                                                                                                                                                | `serviceName` + `spawnCount`, common to every report.                            |
| `base.serviceName?` | `string`                                                                                                                                                                                                                                                                                               | -                                                                                |
| `base.spawnCount?`  | `number`                                                                                                                                                                                                                                                                                               | -                                                                                |
| `extra?`            | [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)<[`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[`IsolationReport`](../interfaces/IsolationReport.md)>, `"at"` | `"phase"` | `"serviceName"` | `"spawnCount"`> | Phase-specific fields (see [IsolationReport](../interfaces/IsolationReport.md)). |
| `now?`              | () => `string`                                                                                                                                                                                                                                                                                         | Injectable clock for tests; defaults to `new Date().toISOString()`.              |

## Returns

`void`
