TelescopeStore class
In-memory ring-buffer store for the 9 V1+alpha-2 watcher record types plus the frame-perf buffer.
Default cap: 500 entries per buffer (configurable via setCapacity, for
every buffer at once or for one TelescopeKind). The frame-perf buffer
has its own capacity (default 3600) rather than sharing _cap; see its
field docblock.
The log, event, exception and HTTP buffers hold records already run through TelescopeRedaction.redactor when one is registered.
Singleton accessed via static methods. Hot-restart resets the buffers naturally (statics re-run their initializers).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
onCacheRecord
→ Stream<
MagicCacheRecord> -
no setter
-
onDumpRecord
→ Stream<
DumpRecord> -
no setter
-
onEventRecord
→ Stream<
EventRecord> -
no setter
-
onExceptionRecord
→ Stream<
ExceptionRecord> -
no setter
-
onFramePerfRecord
→ Stream<
FramePerfRecord> -
no setter
-
onGateRecord
→ Stream<
GateRecord> -
no setter
-
onHttpRecord
→ Stream<
HttpRequestRecord> -
no setter
-
onLogRecord
→ Stream<
LogRecordEntry> -
no setter
-
onModelRecord
→ Stream<
MagicModelRecord> -
no setter
-
onQueryRecord
→ Stream<
QueryRecord> -
no setter
- pendingHttpCount → int
-
Total number of HTTP requests currently in flight across every
registered TelescopeHttpAdapter.
no setter
Static Methods
-
clear(
) → void - Clear all buffers.
-
clearFramePerf(
) → void - Clear only the frame-perf buffer.
-
pause(
) → void - Pause all recording. Calls become no-ops until resume.
-
recentCaches(
{int? limit}) → List< MagicCacheRecord> -
recentDumps(
{int? limit}) → List< DumpRecord> -
recentEvents(
{int? limit}) → List< EventRecord> -
recentExceptions(
{int? limit}) → List< ExceptionRecord> -
recentFramePerf(
{int? limit}) → List< FramePerfRecord> -
recentGates(
{int? limit}) → List< GateRecord> -
recentHttp(
{int? limit}) → List< HttpRequestRecord> -
recentLogs(
{int? limit, String? minLevel}) → List< LogRecordEntry> -
recentModels(
{int? limit}) → List< MagicModelRecord> -
recentQueries(
{int? limit}) → List< QueryRecord> -
recordDump(
DumpRecord r) → void -
recordEvent(
EventRecord r) → void -
Buffer
rand emit it on onEventRecord, with its payload made JSON-safe and run through the registered TelescopeRedaction.redactor (if any) first; dropped when the redactor throws. See TelescopeRedaction.redactEventRecord. -
recordException(
ExceptionRecord r) → void -
Buffer
rand emit it on onExceptionRecord, after the registered TelescopeRedaction.redactor (if any) ran over its message and stack; dropped when the redactor throws. -
recordFramePerf(
FramePerfRecord r) → void -
recordGate(
GateRecord r) → void -
recordHttp(
HttpRequestRecord r) → void -
Buffer
rwith its credentials masked by TelescopeRedaction, and emit the masked copy on onHttpRecord. Never throws on a malformed body: one that is not JSON is buffered as given. When a TelescopeRedaction.redactor is registered it runs after the key masking, before the record enters the queue or the stream; a record the redactor throws on is dropped, neither buffered nor emitted. -
recordLog(
LogRecordEntry r) → void -
Buffer
rand emit it on onLogRecord, after the registered TelescopeRedaction.redactor (if any) ran over its text; dropped when the redactor throws. -
recordMagicCache(
MagicCacheRecord r) → void -
recordMagicModel(
MagicModelRecord r) → void -
recordQuery(
QueryRecord r) → void -
resetForTesting(
) → void - Test-only reset.
-
resume(
) → void - Resume recording.
-
setCapacity(
int cap, {TelescopeKind? kind}) → void -
Set the capacity of every buffer but frame perf (default 500), or of
the one buffer
kindnames. -
setFramePerfCapacity(
int cap) → void -
Set the frame-perf buffer's own capacity (default 3600). Independent
of the shared setCapacity; see
_framePerfCapfor why.