trackkit / facade/diagnostics / DiagnosticsService
Class: DiagnosticsService
Defined in: facade/diagnostics.ts:106
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)
- dispatcher: key dispatcher settings affecting delivery
- performance: current performance metrics (if enabled)
- 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,facade,dispatcher,consent,queues,context,provider,performanceTracker):DiagnosticsService
Defined in: facade/diagnostics.ts:110
Parameters
id
string
facade
dispatcher
consent
snapshot
queues
QueueService
context
null | ContextService
provider
ProviderManager
performanceTracker
null | PerformanceTracker
Returns
DiagnosticsService
Methods
updatePolicyDiagnostics()
updatePolicyDiagnostics(
reason,transient):void
Defined in: facade/diagnostics.ts:134
Parameters
reason
"ok" | "localhost" | "not-browser" | "consent-pending" | "consent-denied" | "dnt" | "domain-excluded"
transient
boolean
Returns
void
updateCurrentBatchMetrics()
updateCurrentBatchMetrics(
size,quantity):void
Defined in: facade/diagnostics.ts:146
Parameters
size
number
quantity
number
Returns
void
getSnapshot()
getSnapshot():
DiagnosticsSnapshot
Defined in: facade/diagnostics.ts:151