崩溃报告

崩溃报告

在崩溃拉低你的应用商店评分之前,捕获、归类并修复它们

免费开始使用

智能分组

具有相同指纹的崩溃会自动归类,让你看到的是一个可操作的问题,而非成千上万的重复报告。

Breadcrumb 轨迹

崩溃前多达 50 个 Breadcrumb 事件,精确还原玩家操作过程,帮助你可靠地复现问题。

无崩溃会话率

追踪无崩溃完成的会话比例,随着问题逐步修复,观察指标持续改善。

快速集成

快速集成

游戏运行中

会话
00:14:32
无崩溃率
98.2%
Unity (C#)
// Unity C#: Crash Reporting
using System;
using System.Collections.Generic;
using PM.horizOn.Cloud.Manager;

// Once at startup: registers the crash session and catches unhandled exceptions
CrashManager.Instance.StartCapture();
CrashManager.Instance.SetUserId(UserManager.Instance.CurrentUser.UserId);

// Context that is sent with the next report
CrashManager.Instance.RecordBreadcrumb("scene", "Entered world_3");

// Report a handled exception as NON_FATAL
try { LoadTextures(); }
catch (Exception ex)
{
    CrashManager.Instance.RecordException(ex, new Dictionary<string, string> { ["asset"] = "boss_texture" });
}
REST
# REST API: Crash Reporting

# Create a crash session at app start
curl -X POST https://horizon.pm/api/v1/app/crash-reports/session \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"SESSION_ID","appVersion":"1.2.3","platform":"Android"}'

# Report a crash (type CRASH, NON_FATAL or ANR)
curl -X POST https://horizon.pm/api/v1/app/crash-reports/create \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "SESSION_ID",
    "type": "CRASH",
    "message": "NullReferenceException in PlayerController",
    "fingerprint": "PlayerController.NullRef",
    "appVersion": "1.2.3",
    "sdkVersion": "1.0.0",
    "platform": "Android",
    "os": "Android 14",
    "deviceModel": "Pixel 8"
  }'

这些示例使用 Unity SDK(C#)和 REST API。Godot 和 Unreal 在各自的 SDK 中有相同的调用: 参见快速入门

常见问题

常见问题

准备好开始集成了吗?

今天就开始使用 horizOn 构建你的游戏后端,免费套餐开箱即用。