Gamend.ClientLogs.Session (gamend_core v1.0.1192)

Copy Markdown View Source

One run of the game on one device, as seen from the server.

Holds no log lines. The lines go to Logger and out to the host's log store; this is the index that makes them findable — who, which build, which lobbies, how many errors. See Gamend.ClientLogs.

client_session_id is generated by the client (it has to name the session before it can reach us) and is bound to an owner on first write, so a second device claiming the same id is rejected rather than allowed to write into someone else's timeline.

Summary

Functions

Changeset for the first write of a session. Later batches update counters through Gamend.ClientLogs, not through here.

Types

t()

@type t() :: %Gamend.ClientLogs.Session{
  __meta__: term(),
  app_version: term(),
  build: term(),
  client_session_id: term(),
  device_id: term(),
  dropped_count: term(),
  entry_count: term(),
  error_count: term(),
  flagged: term(),
  id: term(),
  inserted_at: term(),
  last_seen_at: term(),
  locale: term(),
  max_seq: term(),
  meta: term(),
  platform: term(),
  started_at: term(),
  updated_at: term(),
  user: term(),
  user_id: term(),
  warn_count: term()
}

Functions

builds()

@spec builds() :: [String.t()]

changeset(session, attrs)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Changeset for the first write of a session. Later batches update counters through Gamend.ClientLogs, not through here.

platforms()

@spec platforms() :: [String.t()]