Last Updated: 8/31/2021, 8:22:09 AM

# Telemetry

# Overview

The AccelByte 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:

telemetry

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

# Set Up the Data Warehouse

To be able to receive events and the player actions log, you have to set up a data warehouse. The Game Telemetry service supports several different data warehouses by default, and AccelByte can work with you to integrate a data warehouse that we don’t yet support.

# Redshift

We’ll create a connector for you in Kafka Connect to pull event data from Kafka and write the data to Redshift. Nested data will be flattened in the Game Telemetry pipeline before getting pushed into Kafka. Each payload attached to the events will be converted into a Redshift column.

# Integration Requirements

AccelByte can integrate the Game Telemetry pipeline with Redshift for you. To do so, you’ll need to send us the following information:

  • Redshift credentials
  • Redshift database name
  • Redshift table name

After we input that information into Kafka Connect, the connector will be created and the pipeline will automatically send game Game Telemetry data to Redshift.

# S3

# Integration Requirements

AccelByte can integrate the Game Telemetry pipeline with S3 for you. To do so, you’ll need to send us the following information:

  • AWS Credentials
  • Bucket name

After we input that information into Kafka Connect, the pipeline will automatically send Game Telemetry data to your S3 bucket.

# Snowflake

To help you use our Game Telemetry service with Snowflake, we’ll provide you with Kafka Connect, Kafka Connect UI, Snowflake JDBC, and Snowflake Kafka Connector.

# Integration Requirements

AccelByte can integrate the Game Telemetry pipeline with Snowflake for you. To do so, you’ll need to send us the following information:

  • Database name
  • Schema Name
  • Username
  • Snowflake URL

After we input that information into Kafka Connect, the pipeline will automatically send the event data to Snowflake.

# Send Event

With our Game Telemetry service, you can track and log players' actions within the game by sending an event to be tracked to the game’s streaming pipeline. To track those actions a player session is required, so you must enable your players to create an account in your game before you can use this feature.

# Preparation Before Sending Events

By default, telemetry events will be sent to a game’s streaming pipeline as a batch after a set amount of time. This amount of time should be configured before telemetry events can be sent. Any events that should be sent immediately should also be added to the immediate event list. Here is an example of how to configure your telemetry events.

# Send Event using SDK

The following function signature can also be used to send an event. The returned data will be displayed in your data warehouse, where you’ll be able to customize its visualization.

# Send Event using API

To send an event to the designated streaming pipeline, follow these steps.

  1. Use the Protected Save Events: <a href="https://demo.accelbyte.io/game-telemetry/apidocs#/default/protected_save_events_game_telemetry_v1_protected_events_post" target="_blank"POST - ​/game-telemetry​/v1​/protected​/events> endpoint.

  2. Fill in the Request Body.

    • Input the EventNamespace with the game namespace.
    • Input the EventName with the name of the event e.g. player_killed, mission_accomplished.
    • Input the Payload with an arbitrary JSON of the event. Here are some examples of the payload for different use cases:
    • If you want to track player login and logout, you can use the following reference for your request body.
    • If you want to track when matchmaking starts and ends, you can use the following reference for your request body.
    • If you want to detect a player’s active status on the server, you can use the following reference for your request body.
    • The Event Timestamp will be generated automatically by the Game Telemetry in ISO 8601 format, e.g. 2021-01-05T05:04:08.775Z.
    • The Event ID will be generated automatically by the Game Telemetry. Upon successful request, the event will be sent to the designated streaming pipeline for tracking.