Skip to content

Monitor captured Realms

GET
/api/v1/realm-monitor
curl --request GET \
--url http://localhost:11044/api/v1/realm-monitor \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Journal offsets, consumer lag, channel activity and Wasm figures for every live captured Realm in your world. Unknown numbers are null. Reading it delivers nothing and runs no handler.

OK

Media type*/*

The signed-in owner’s realm monitor, answered by GET /realm-monitor: the host’s Wasm runtime and every live captured realm in their world

object
at
required

When this reading was taken, ISO-8601 UTC to the second

string
realms
required

Each live (not revoked) captured realm installation in the owner’s world, sorted by realm name, including any with no channels or sources

Array<object>

One live captured realm installation as the monitor shows it

object
channels
required

Each channel the realm declares. Empty when it declares none, or when its channels could not be read just now

Array<object>

One channel a realm declares, and how much it has delivered since the app started

object
frames
required

Frames handed to the handler since the app started

integer format: int64
lastFrameAt

When the channel last handed a frame to its handler, ISO-8601 UTC to the second. Null when it has not since the app started

string
name
required

The channel’s name, the stem of its declaration file

string
state
required

One of “running”, “ready” (could start, is not running), “stopped” or “blocked” (a grant, a credential or a readable secret is missing)

string
transport
required

The transport the channel declares, such as a websocket, a long-poll or a webhook

string
digest
required

The digest of the realm content this installation admitted, 64 lowercase hex characters

string
installationId
required

The installation’s id, a UUID. A realm admitted again after being revoked gets a new one

string
realm
required

The realm’s name

string
revision
required

The installation’s admission revision, which rises by one with every change to its admission: grants approved, an upgrade, a revocation

integer format: int64
sources
required

Each event source the realm declares, sorted by name, approved or not

Array<object>

One event source a realm declares, with its journal position and the consumers reading it

object
appendedSinceStart
required

Items appended since the app started, counting every item of every batch

integer format: int64
approved
required

Whether the owner has approved this source. Only an approved source has a journal, so the offsets are null when false

boolean
consumers
required

The approved consumers reading this source, from any realm in the owner’s world. Empty when unapproved or unreadable

Array<object>

One approved consumer of a source and how far it has read

object
acknowledgedThroughOffset

The journal offset the consumer has checkpointed through. Null when it has never started reading

integer format: int64
lag

Records between the checkpoint and the end of the journal, endOffset minus acknowledgedThroughOffset. Null when it has never started reading

integer format: int64
lastAcknowledgedAt

When the consumer last checkpointed, ISO-8601 UTC to the second. Null when it has not since the app started

string
name
required

The consumer’s name within its realm

string
pendingItems

Items offered to the consumer and not yet acknowledged; 0 when nothing is on offer. Null when it has never started reading

integer format: int32
realm
required

The realm the consumer belongs to, which need not be the realm that declares the source

string
endOffset

Offset of the newest record in the source’s journal; the retained records are those after retainedAfterOffset up to and including this. Null when unapproved or unreadable just now

integer format: int64
lastAppendedAt

When a batch last landed in the journal, ISO-8601 UTC to the second. Null when none has since the app started

string
name
required

The source’s name as the realm declares it

string
retainedAfterOffset

Offset below which compaction has dropped records: the oldest retained record is the one after it. Null when unapproved or unreadable just now

integer format: int64
wasm
required

The realm’s Wasm module figures since the app started

object
avgDispatchMs

Mean dispatch time in milliseconds, to one decimal place. Null until there has been a dispatch

number format: double
coldStarts

Dispatches that found the module missing from the runtime cache and had to load it first

integer format: int64
dispatches

Handler dispatches into the module since the app started, successful or not

integer format: int64
failures

Of those dispatches, how many ended in any outcome other than success

integer format: int64
hostCalls

Calls the module made back into the host, such as gateway or graph calls, since the app started

integer format: int64
maxDispatchMs

Longest dispatch in milliseconds, to one decimal place, over the meters’ recent window. Null once that window passes with no dispatch

number format: double
moduleBytes

Size of the realm’s compiled Wasm module in bytes. Null until it is known

integer format: int64
peakMemoryBytes

Highest guest memory use in bytes over the meters’ recent window. Null once that window passes quietly

integer format: int64
runtime
required

The host-wide Wasm runtime, shared by every realm on this server

object
activeDispatches

Dispatches holding a runtime slot right now, across every world on this server. Null when the gauge is not registered

integer format: int64
backend
required

What captured realm handlers run on. Always “wasm”

string
capturedModules
required

How many of the listed realms have a Wasm module whose size is known

integer format: int32
containersPerRealm
required

Containers each realm needs. Always 0: captured realms run inside the app’s own process

integer format: int32
journalStore
required

The channel journal’s storage backend: “file” or “neo4j”

string
runtimeCached

Parsed modules held in the host’s runtime cache right now, across every world on this server. Null when the gauge is not registered

integer format: int64