WorkerTelemetry
Reports what a worker holds to the World map of the Nebula Dashboard (MeshTelemetry): for every container with anything in it on this worker, how many players, bots, server-driven and other authoritative entities it holds there, and how ...
Nebula · Packages/com.1by3.nebula/Runtime/Worker/WorkerTelemetry.cspublic sealed class WorkerTelemetry : IDisposableReports what a worker holds to the World map of the Nebula Dashboard (MeshTelemetry):
- for every container with anything in it on this worker, how many players, bots, server-driven and other authoritative entities it holds there, and how many ghosts;
- the box, pose and velocity of every carried container (
NetworkIdentity.Carried) whose carrier this worker simulates, with the container the carrier sits in; - the cells it has loaded, in a partitioned world;
- and, only while somebody has the map open, one point per authoritative entity.
Positions are absolute world coordinates, so workers with different floating origins agree. The document is posted to -nebula-telemetry <url> (the orchestrator passes its own dashboard's /api/telemetry to every worker it launches), or handed straight to an orchestrator in the same process. It is built in Update, never inside the tick, every IdleIntervalSeconds or DetailIntervalSeconds while the map is watched, and sent from the thread pool; a post still in flight skips the next one rather than queueing.
Fields
IdleIntervalSeconds
public const float IdleIntervalSeconds = 1f;Seconds between documents while nobody has the map open (counts and carried containers only).
DetailIntervalSeconds
public const float DetailIntervalSeconds = 0.5f;Seconds between documents while the map is watched (with entities).
MaxEntities
public const int MaxEntities = 4096;Most entity points in one document; the rest are counted but not drawn.
KindPlayer, KindBot, KindServerDriven, KindCarrier, KindOther
public const string KindPlayer = "p", KindBot = "b", KindServerDriven = "n", KindCarrier = "v", KindOther = "o";Entity kinds as the map receives them.
Properties
Url
public string Url { get; }Where documents are posted; empty when they go to an orchestrator in this process.
DetailRequested
public bool DetailRequested { get; }The orchestrator asked for entities (somebody has the map open).
Sent
public int Sent { get; }Documents built and handed off so far.
Methods
Create
public static WorkerTelemetry Create(MeshTelemetry inProcess);The telemetry sender for a worker: straight into inProcess when an orchestrator runs in the same process, else to the URL of -nebula-telemetry. Null when neither applies, or when the switch is off.
Write
public string Write(string workerId, ushort workerIndex, uint tick, IEnumerable<NetworkIdentity> entities, bool includeEntities, IEnumerable<Vector3Int> loadedCells);Write one telemetry document for the entities a worker holds (authoritative and ghosts). The first property is always "worker": MeshTelemetry.Accept reads the id from there without parsing.
KindOf
public static string KindOf(NetworkIdentity e);How the map draws an authoritative entity: a carrier, a server-driven entity, a bot's or a player's pawn, or anything else.
Dispose
public void Dispose();WorkerScopeLifecycle
The worker's half of the scope lifecycle (docs/scope-lifecycle.md): it keeps the idle clock of the scope parts it owns honest, performs the retire sequence for a scope the orchestrator moved to ScopeState.Retiring, and reports a restore ...
DisconnectInfo
How a client's connection ended: the typed Reason, a Message for logs and the player, and whether the client will try again by itself (WillRetry).