# Production observability

AsukaDesigner does not send telemetry to a remote service by default. The host
application decides where errors are collected.

```ts
const designer = createAsukaDesigner('#app', {
  observability: {
    context: {
      application: 'storefront',
      release: '1.0.0',
    },
    onError(record) {
      Sentry.captureMessage(record.message, {
        level: 'error',
        extra: record,
      });
    },
  },
});
```

The callback receives `type`, `message`, optional `stack`, an ISO timestamp and
the merged context. Global `error` and `unhandledrejection` events are captured
by default. Disable that behavior with `captureGlobalErrors: false`.

Caught integration errors can use the same channel:

```ts
try {
  await saveConfiguration();
} catch (error) {
  designer.util.observability.report(error, { operation: 'save-configuration' });
}
```

The global listeners are removed by `designer.destroy()`. Do not place license
keys, access tokens, personal data or uploaded file contents in `context`.
