Skip to content

trackkit / facade/diagnostics / DiagnosticsService

Class: DiagnosticsService

Defined in: facade/diagnostics.ts:70

DiagnosticsService produces a point-in-time snapshot of the facade state.

It is intentionally read-only and side-effect free:

  • config: selected runtime options relevant to behaviour and debugging
  • consent: stored consent status + metadata (if any)
  • provider: current provider key + provider-reported state/history
  • queue: combined SSR + runtime buffer size and capacity
  • urls: last planned and last sent URLs from the context service

Used by getDiagnostics() on the facade to support debugging and health checks.

Constructors

Constructor

new DiagnosticsService(id, cfg, consent, queues, ctx, provider, providerKey, performanceTracker): DiagnosticsService

Defined in: facade/diagnostics.ts:71

Parameters

id

string

cfg

FacadeOptions

null | { snapshot: undefined | ConsentStoredState; }

queues

QueueService

ctx

ContextService

provider

ProviderManager

providerKey

null | string

performanceTracker

null | PerformanceTracker

Returns

DiagnosticsService

Methods

getSnapshot()

getSnapshot(): DiagnosticsSnapshot

Defined in: facade/diagnostics.ts:84

Returns

DiagnosticsSnapshot