diff --git a/docs/design/schemas/client-diagnostics/v1/attr-registry.json b/docs/design/schemas/client-diagnostics/v1/attr-registry.json index 25b710b7..d22be55b 100644 --- a/docs/design/schemas/client-diagnostics/v1/attr-registry.json +++ b/docs/design/schemas/client-diagnostics/v1/attr-registry.json @@ -39,6 +39,22 @@ "audio_underruns": { "type": "integer", "description": "Audio underrun count." + }, + "session_id": { + "type": "string", + "description": "Playback session identifier for correlation with operational logs." + }, + "play_method": { + "type": "string", + "description": "Selected playback delivery method such as direct, remux, or transcode." + }, + "reason": { + "type": "string", + "description": "Playback route, interruption, or lifecycle reason." + }, + "position_ms": { + "type": "integer", + "description": "Current playback position in milliseconds." } }, "focus": { @@ -67,12 +83,44 @@ "duration_ms": { "type": "integer", "description": "Request duration in milliseconds." + }, + "outcome": { + "type": "string", + "description": "Request outcome such as success, http_error, transport_error, or cancelled." + }, + "error_code": { + "type": "string", + "description": "Stable error classification for a failed request." + }, + "attempt": { + "type": "integer", + "description": "Attempt ordinal for a retried request." } }, "lifecycle": { "state": { "type": "string", "description": "App lifecycle state." + }, + "phase": { + "type": "string", + "description": "Startup or lifecycle phase identifier." + }, + "duration_ms": { + "type": "integer", + "description": "Elapsed duration for the phase in milliseconds." + }, + "outcome": { + "type": "string", + "description": "Result of the phase, such as success, failure, or skipped." + }, + "reason": { + "type": "string", + "description": "Classification for the phase outcome." + }, + "launch_type": { + "type": "string", + "description": "Launch classification, such as cold or warm." } }, "crash": { diff --git a/internal/diagnostics/contract/contract.go b/internal/diagnostics/contract/contract.go index 6709f049..ff0114be 100644 --- a/internal/diagnostics/contract/contract.go +++ b/internal/diagnostics/contract/contract.go @@ -259,6 +259,10 @@ var attrRegistry = map[string]map[string]attrValueType{ "bitrate_kbps": attrInteger, "dropped_frames": attrInteger, "audio_underruns": attrInteger, + "session_id": attrString, + "play_method": attrString, + "reason": attrString, + "position_ms": attrInteger, }, "focus": { "target": attrString, @@ -269,9 +273,17 @@ var attrRegistry = map[string]map[string]attrValueType{ "path": attrString, "status": attrInteger, "duration_ms": attrInteger, + "outcome": attrString, + "error_code": attrString, + "attempt": attrInteger, }, "lifecycle": { - "state": attrString, + "state": attrString, + "phase": attrString, + "duration_ms": attrInteger, + "outcome": attrString, + "reason": attrString, + "launch_type": attrString, }, "crash": { "fingerprint": attrString,