Skip to main content

Adding telemetry to a game

Ten minutes, twice: once in the Creator Hub, once in Studio. You never write any code. You set two values and publish.

What it does​

It records who played, for how long, and on which team, and it checks every player who joins against the blocklist. Everything else (attendance, team activity posts) is worked out later from the records, so the thing running inside your game stays small and stays boring.

It does not read chat, track positions or run anything on players' machines. The one way it touches gameplay is the blocklist kick, which you can switch off. See The blocklist. There is no LocalScript in this model and there never will be one.

What you need before you start​

You need the model file and two keys. They all come from the same place: ask in the Titanite Discord.

  • a game key. A short name for this game in the records, like genesius. Each game has its own.
  • the ingest key. A long secret string. There is one, and every game on the network uses it. Treat it like a password for all of them: never paste it into a script, a chat or a screenshot.

If you want blocklist notices in a Discord channel, ask for an operator channel at the same time.

Turn on HTTP requests​

Studio → Home → Game Settings → Security → Allow HTTP Requests: On.

Without this every request fails silently and the log will say so on start-up.

Store the ingest key as a secret​

On the Creator Hub, open your experience → Settings → Secrets → Add Secret.

FieldValue
Nametitan_telemetry
Valuethe ingest key you were given

The name must match exactly.

Why not just put it in the script? Anyone who can open the place file can read a key that lives in a script, and with it they could write any activity they liked into the records, including for people who never played. A secret is not in the place file, and rotating it does not need a republish.

Put the model in​

Drag the model into ServerScriptService. You should have:

ServerScriptService
└── TitanTelemetry (Script)
└── TelemetryConfig (ModuleScript)

If TelemetryConfig is not a child of TitanTelemetry, the script will not find it. It waits for it forever, and Roblox warns "Infinite yield possible".

Set the game key​

Open TelemetryConfig and set one line:

GAME_KEY = "genesius", -- the key you were given, for THIS game

Leave everything else alone, apart from the blocklist settings described below if you want them.

Publish and check​

Publish, join your live game, press F9 to open the Developer Console, and pick the Server tab. Studio's Output stays empty: the model switches itself off in Studio, so a playtest never files fake activity. Look for:

[TitanTelemetry] ready, reporting as "genesius" every 60s
[TitanTelemetry] registered: genesius

ready comes first, because registered waits for the service to answer. A blocklist: N id(s) on file line also appears once the first blocklist download lands. All of these print while DEBUG is on in TelemetryConfig, which it is by default.

That is it. Sessions are sent about once a minute and when the server shuts down.

When it does not work​

The script tells you which of these it is. It never fails quietly.

Log lineWhat to do
GAME_KEY is not setStep 4.
no secret named "titan_telemetry"Step 2. Check the spelling, then republish.
could not reach telemetry (401)The secret's value is wrong. Paste the ingest key again in step 2, then republish.
could not reach telemetry with any other statusStep 1, then check BASE_URL is unchanged.
send failed (401), N segment(s) kept to resend under the same idThe same wrong secret. The model keeps the batch and tries again on every flush, so fix the secret and republish.
queue full, dropping the oldest segmentThe service has been unreachable long enough to fill the memory queue. Fix whatever the send failed lines say. The game itself is never affected.
refused (403)The service has this game switched off, or its start-up registration did not go through. The model registers itself when a server starts, so switched off is the usual cause. Sessions are discarded until it is fixed. Ask in the Titanite Discord.
refused (400)A bug on our side, not yours. Send us the line in the Titanite Discord.
Infinite yield possible mentioning TelemetryConfigStep 3. TelemetryConfig has to be a child of TitanTelemetry.
blocklist: <name> (<id>) kicked. On file with ...The blocklist kicked that player. See The blocklist.
Nothing at all in the logThe model is not in ServerScriptService, or DEBUG is off.
Studio session, telemetry is off.Expected in Studio. Playtests are not recorded, so testing does not file fake activity.

Things worth knowing​

  • Shutting a server down keeps most sessions. On shutdown the model closes everyone's session and makes one attempt to send them. A very busy server, or an outage at that moment, can still lose the last few minutes.
  • If our endpoint goes down, nothing breaks. Sessions queue in memory and go when it comes back. If it stays down long enough to fill the queue, the oldest are dropped. Never the game.
  • A batch sent twice counts once. Each batch carries an id that the server remembers, so a request that timed out can safely be sent again.
  • Team changes split a session. Someone who plays an hour on two teams produces two segments of thirty minutes, not one hour on whichever team they happened to end on.
  • Playtests are not recorded, so testing never files fake activity.

The blocklist​

Every player who joins is checked against two lists that Titanite merges: RCR (the Roblox Criminal Records) and the Titanite blocklist. Each person on file has one of three standings:

StandingWhat the model does by default
ban, the most seriousKicks the player on join
flag, on file for something staff thought worth recordingLets the player in and tells your operator channel
watch, recorded so a pattern is visible laterLets the player in and tells your operator channel, in a quieter colour
  • Change who gets kicked with BLOCKLIST_KICK_ON in TelemetryConfig. The default is { ban = true, flag = false, watch = false }. Setting flag = true kicks a much wider group, so think before you do.
  • Switch it off with BLOCKLIST_ENABLED = false.
  • Players are told nothing. A kicked player sees "You cannot join this game." (BLOCKLIST_KICK_MESSAGE). Nothing appears in chat.
  • You hear about every match. The live server log gets a line with the player's name, Roblox ID, standing and a link to the record. If your game has an operator channel, the service posts the same to it. The post never carries the reason a staff member wrote.
  • Anyone named can read their own record and dispute it at that link. Point them there.

For what the Titanite blocklist is, see Moderation in the Utilities pages.

Removing it​

Delete the script. Nothing else in your game depends on it, and records already sent are unaffected. Removing it also removes the blocklist check.