Nebula
Worker

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 ...

generated from the sources
public sealed class WorkerTelemetry : IDisposable

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 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();

On this page