Provided Plugins #
Two plugins are available ready to use. The DbTelemetryPlugin and the S3TelemetryPlugin.
You can configure telemetry plugins on the social, game, or both.
S3TelemetryPlugin #
To configure this plugin, follow the configuration below. All values are hot re-loadable.
Example S3 plugin config
game: # or social
pluginConfigs:
TelemetryService.telemetryPlugin:
class: "pragma.telemetry.s3.S3TelemetryPlugin"
config:
eventBatchSize: 10000
timeWindowPerBatchMillis: 60000
s3BucketName: "<telemetry-bucket-provided-by-infra>"
shardName: "<env-shard-name>"
Accessing events from S3 #
We will work with you to provide the ingestion tool of your choice read access to the data. This process requires an exchange of AWS arns. We will attach a given AWS account or role a read access policy. Then we will provide a permissions policy for you at attach to the account or role.
Structure of S3 bucket objects. #
Data is stored in a bucket based on the following naming scheme:
<shardName>/'yyyy/MM/dd/kk/<service-instance-id>/yyyyMMdd-kkmmss_SSS'.jsonl.
The top level object: <shardName>comes from the pragma.telemetry.s3.S3TelemetryPlugin configuration.
DbTelemetryPlugin #
The DbTelemetryPlugin will store events in a mySQL database.
Example plugin config
game: # or social
pluginConfigs:
TelemetryService.telemetryPlugin:
class: "pragma.telemetry.db.DbTelemetryPlugin"
This plugin also requires database configuration. The database configuration has defaults, but you can override as needed.
game: # or social
serviceConfigs:
TelemetryDaoConfig:
databaseConfig:
identifier: "defaultIdentifier"
schema: "game-telemetry" # or social-telemetry
Telemetry Plugin #
If you want to use a datastore of your choice, implement your own plugin by following the TelemetryPlugin interface.
interface TelemetryPlugin {
suspend fun recordEvent(event: Event)
suspend fun recordEvents(events: List<Event>)
suspend fun getEvents(): List<Event>
}