Session Observability
Monitor and analyze multiplayer session performance through detailed events and session data.
阅读时间3 分钟最后更新于 4 天前
Session Observability 服务可以公开多人游戏会话中发生的关键事件。目前,该服务支持 Matchmaker 事件。 Session Observability API 支持通过 ID 或以下过滤条件获取会话详细信息:
- 池 ID
- 池名称
- 队列名称
- 区域 ID
- 匹配票据 ID
- 创建时间
- 更新时间
身份验证
Session Observability 服务使用服务帐户身份验证。被授予项目级 Multiplayer Session Details Viewer(多人游戏会话详细信息查看者)角色的服务帐户将有权向该项目的 API 发出请求。会话事件
目前支持以下会话事件:
事件名称 | 描述 |
|---|---|
| Match Created(已创建匹配) | Matchmaker 创建了一个匹配。这个匹配的 |
| Allocation Requested(已请求分配) | 在指定区域中为该会话请求了 Multiplay Hosting 分配。 |
| Allocation Succeeded(分配成功) | 请求的 Multiplay Hosting 分配已成功。 |
| Allocation Failed(分配失败) | 请求的 Multiplay Hosting 分配已失败。 |
| Players Assigned(已分配玩家) | Matchmaker 已将玩家分配给该会话。 |
| Backfill Match Created(已创建回填匹配) | 需要启用回填。为与该会话相关的回填票据创建了匹配。此事件包含这个匹配的团队以及创建这个匹配所采用的规则。 |
| Players Connected(已连接玩家) | 需要启用回填。Matchmaker 外部的玩家已连接到该会话。Matchmaker 使用 DGS 发送的回填更新来确定这些玩家。 |
| Players Disconnected(玩家已断开连接) | 需要启用回填。Matchmaker 外部的玩家已从该会话断开连接。Matchmaker 使用 DGS 发送的回填更新来确定这些玩家。 |
会话详细信息示例
以下是一个从 API 接收到的响应示例,内容为会话详细信息,其中未启用回填。{ "allocation": { "completedAt": "2024-03-19T22:12:48.237Z", "regionId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "requestedAt": "2024-03-19T22:12:47.981Z", "status": "Allocated" }, "createdAt": "2024-03-19T22:12:47.847Z", "environmentId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "gameMode": { "poolId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "poolName": "default-pool", "queueId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "queueName": "default-queue" }, "matchmakingStatus": "OpenNotBackfilling", "projectId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "sessionEvents": [ { "appliedRules": [ { "context": "Team", "teamId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "name": "Blue Team", "type": "Difference", "source": "Players.CustomData.Skill", "reference": 500, "not": false, "externalData": {} } ], "teams": [ { "id": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "name": "Red Team", "playerIds": [ "Player 1", "Player 2", "Player 3", ] }, { "id": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "name": "Blue Team", "playerIds": [ "Player 4", "Player 5", "Player 6", ] } ], "timestamp": "2024-03-19T22:12:47.847Z", "type": "match.created" }, { "regionId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "timestamp": "2024-03-19T22:12:47.981Z", "type": "allocation.requested" }, { "timestamp": "2024-03-19T22:12:48.237Z", "type": "allocation.succeeded" }, { "assignmentStatus": "Found", "players": [ { "customData": { "Skill": 2000 }, "id": "Player 3", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" }, { "customData": { "Skill": 1800 }, "id": "Player 4", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" }, { "customData": { "Skill": 2100 }, "id": "Player 5", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" }, { "customData": { "Skill": 1750 }, "id": "Player 6", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" }, { "customData": { "Skill": 1950 }, "id": "Player 1", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" }, { "customData": { "Skill": 1675 }, "id": "Player 2", "qosResults": [], "ticketId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5" } ], "timestamp": "2024-03-19T22:12:49.198Z", "type": "players.assigned" } ], "sessionId": "0e5a4f23-5e1a-4a82-80b0-a1bd80019bc5", "updatedAt": "2024-03-19T22:12:49.198Z"}