Skip to main content

Game telemetry

Last updated on September 22, 2023
note

Game telemetry is not available on AGS Starter tier.

Overview

The Game Telemetry service acts as a scalable event data ingestion pipeline for your game, to send events into a designated streaming pipeline using an HTTP based REST API. With this service, you can collect and analyze player data and use it to inform future design decisions.

How it works

The diagram below gives a basic overview of how the Game Telemetry service works:

Image shows Game Telemetry service diagram

AccelByte Game Telemetry SDK sends events to be tracked into the Game Telemetry pipeline. After that, the Game Telemetry pipeline sends events to Kafka. Kafka Connect then pulls the events from Kafka and passes them to the designated data warehouse, and data visualization tools.

Manage Game Telemetry using the Admin Portal

View Event Payload

  1. In the Admin Portal, go to the Analytics section, then click Game Telemetry.

    Image shows Game Telemetry in sidebar

  2. On the Game Telemetry page, you can view telemetry events payloads based on the filters you apply. The available filters are as follows:

    • Use the Namespace filter to show events from a specific namespace only. This filter will only appear if you are in the publisher namespace.
    • Use the Start Date and End Date filters to define the date range when the event was created.
    • Use the Event Name filter to specify the event name.
    • Use the Event ID filter to search for an event using its ID.
    • Enter the Event Payload filter in the format field.subfield:value. Field and subfield are case sensitive, but value is not. You can enter multiple event payloads by pressing Enter then adding another event payload.

    For example, to look for players named Alice in this payload, you would write player.name:alice.

    {
    "player": {
    "name": "alice"
    }
    }
  3. After selecting your filters, click the Apply Filter button to begin your search.

  4. Select an event to see its event payload details.

    Image shows the Game Telemetry page

Connect custom services to Game Telemetry using the Server SDKs

SDK initialization

Before using the Game Telemetry service from the SDK, you will need to initialize your server-side SDK to ensure that you are authorized, and able to perform create, read, update, and delete actions.

Golang SDK initialization

Before using the Game Telemetry service from the Golang SDK, you will need to initialize the SDK by following the steps below:

  1. Create your OAuth Client. The Game Telemetry endpoint doesn't require any permissions.

  2. Log in as a Client using the SDK.

  3. Initialize the Game Telemetry service using the following function:

    operationsService := &gametelemetry.OperationsService{
    Client: factory.NewGametelemetryClient(&repository.ConfigRepositoryImpl{}),
    TokenRepository: &repository.TokenRepositoryImpl{},
    }

Once completed, you can use the Golang SDK to create, read, update, or delete Game Telemetry from your serverless app.

Send Events

Use the following code to send events into designated streaming pipelines:

errInput := operationsService.ProtectedSaveEventsGameTelemetryV1ProtectedEventsPost(input)
if errInput != nil {
return errInput
}
return nil

Retrieve a player's total playtime

Use the following function to retrieve a player's total playtime in Steam for a specific game. This endpoint will also store the player's total playtime in the service cache. Set the player's Steam account to public so the Game Telemetry service can retrieve their total playtime data.

ok, err := operationsService.ProtectedGetPlaytimeGameTelemetryV1ProtectedSteamIdsSteamIDPlaytimeGet(input)
if err != nil {
return err
}
return nil

Update a player's total playtime

Use the following function to update a player's total playtime in Steam for a specific game in the service cache.

errInput := operationsService.ProtectedUpdatePlaytimeGameTelemetryV1ProtectedSteamIdsSteamIDPlaytimePlaytimePut(input)
if errInput != nil {
return errInput
}
return nil