OBSERVERTC / Observer

Sample persistence and enrichment

Persist the accepted sample and enrich it with application data.

Live entities show the current state; a sink keeps the samples that produced it. Choose a sink when you need historical investigation, exports, or replay. Observer does not require a database: the destination is chosen by your application.

Sinks are per-client via createClientSink; built-ins are JSONL and in-memory. They persist the final injection-merged sample. During accept, injectAttachment/Event/Issue/MetaData/ExtensionStat affects the active sample immediately; between accepts it queues; close flushes pending data before sink teardown. A sink failure is logged, not a substitute for application persistence guarantees.

Source references

Logging

Supply a logger in Client Monitor configuration for browser logs. On the server, use setObserverLogger and the common logger API. Route these logs to your existing application logger.

Observer logger source.

Version coverage varies by reference. Source revisions · Markdown source