Syntax
NewRelic.recordBreadcrumb(string $Name, map<string, object> $eventAttributes)
Records a MobileBreadcrumb event, useful for crash analysis.
Requirements
Agent version 5.13.0 or higher.
Description
This call creates and records a MobileBreadcrumb
event, which can be found in Insights and in the crash event trail. Mobile breadcrumbs are useful for crash analysis; they should be created for app activity that may be helpful for troubleshooting crashes.
In addition to whatever custom attributes you choose, the event will also have associated session attributes. Unlike with using setAttribute
, adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.
For related Android SDK API calls, see Send custom attributes and events to Insights.
Parameters
Parameter | Description |
---|---|
string | Required. The name you want to give to the breadcrumb event. |
map<string, object> | Optional. A map that includes a list of attributes of the breadcrumb event. Create attributes for any event descriptors you think will be useful. |
Return values
Returns true
if the event is recorded successfully, or false
if not.
Examples
Simple breadcrumb event call
Map attributes = new HashMap();attributes.put("attributeName1", "value1");attributes.put("attributeName1", 2);boolean eventRecorded = NewRelic.recordBreadcrumb("Name", attributes);
Breadcrumb event with real-world values
Map attributes = new HashMap();attributes.put("button", "sign-in");attributes.put("location", "LaunchFragment");
NewRelic.recordBreadcrumb("user tapped sign in button", attributes);
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。