firebase - 在 Firebase 中查看事件详情
问题描述
我正在向 Fabric 和 Firebase 发送应用使用分析事件。与事件一起,我还发送了另一个值(示例事件类型是 font_selection,我传递的值是用户选择的字体 - 这是一个告诉我使用了哪种字体的数字)。我正在使用 Fabric 事件,当我选择 font_selection 事件时,我可以看到或多或少地使用了哪些字体(我可以看到每种不同字体的数字)。
由于 Fabric 功能正在转移到 Firebase,我开始检查 Firebase 中的 Analytics(分析)部分。不幸的是,我在 Firebase > Analytics > Events 中找不到上述信息。我可以看到该事件 font_selection,但是当我单击它时,我没有获得以前在 Fabric 中获得的其他信息。是否有我遗漏的东西或这些附加信息已从 Firebase 中删除?
解决方案
这对我来说仍然是一个问题。这是我将事件发送到 Firebase 的方式:
protected void Report(string id, Severity severity, string message = null, Exception exception = null)
{
try
{
var processedId = id ?? severity.ToString().ToLowerInvariant();
var values = new Dictionary<string, string>();
values.Add("severity", severity.ToString().ToLowerInvariant());
if (!string.IsNullOrWhiteSpace(message))
{
values.Add("message", message);
}
if (exception != null)
{
values.Add("exception", exception.Message);
values.Add("trace", exception.StackTrace);
}
SendEvent(values, processedId);
}
catch
{
// do nothing.
}
}
protected override void SendEvent(Dictionary<string, string> eventData, string id)
{
var firebaseAnalytics = FirebaseAnalytics.GetInstance(Android.App.Application.Context);
var bundle = new Android.OS.Bundle();
foreach(var pair in eventData)
{
bundle.PutString(pair.Key, pair.Value);
}
firebaseAnalytics.LogEvent(id, bundle);
}
在运行时,我成功调用了它,我可以看到这些事件在 Firebase 控制台中弹出:
但是如何显示我捆绑的其余属性呢?这是控制台在事件中向我显示的内容:
我觉得我一定是用错了什么的。没有 UI 可以向我显示一个简单的按时间顺序排序的表,其中包含事件以及它们附带的属性。坦率地说,我不明白这个工具对我有什么好处。
推荐阅读
- python - 可以用软件模拟网卡吗?
- python - 无法找到如何在 Visual Studio 2019 中安装 pandas 库
- position - 让页脚贴在屏幕底部
- java - 从火力基地检索信息
- java - sql, javax.persistence.criteria:检查一个用逗号分隔的字符串值与字符串列表的数据库表列
- go - 如何在 go-swagger 中使用代码 401 或 404 而不是 500 响应无效的不记名令牌
- arrays - 在 nlog(n) 时间内对整数数组进行排序而不使用比较运算符
- c# - 从服务器加载文件
- javascript - 查找数组的第一个元素并将其显示在 map 函数中但有警告 - React
- python - 如何用 Qt5 python 中的按钮替换全局变量?