---
title: Record breadcrumbs
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/record-breadcrumb
---

## Android

### Syntax [#syntax]

#### Java [#java]

```java
      NewRelic.recordBreadcrumb(
                  string $Name,
                  map<string, object> $eventAttributes
              )
```

#### Kotlin [#kotlin]

```kotlin
NewRelic.recordBreadcrumb(
            breadcrumbName: String?,
            attributes: MutableMap<String?, Any?>?
        )
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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 any custom attributes you choose, the event will also have associated [session attributes](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter         | Type         | Description                                                                                                                                       |
| ----------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name`            | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `eventAttributes` | `dictionary` | 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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Examples [#examples]

Here's an example of a simple breadcrumb event call:

#### Java [#java]

```java
Map attributes = new HashMap();
attributes.put("attributeName1", "value1");
attributes.put("attributeName1", 2);
boolean eventRecorded = NewRelic.recordBreadcrumb("Name", attributes);
```

#### Kotlin [#kotlin]

```kotlin
val map = mutableMapOf<String,Any>("attributeName1" to "value1", "attributeName1" to 2)
val eventRecorded = NewRelic.recordBreadcrumb("Name", map)
```

Here's an example of a breadcrumb event with real-world values:

#### Java [#java]

```java
Map attributes = new HashMap();
attributes.put("button", "sign-in");
attributes.put("location", "LaunchFragment");

NewRelic.recordBreadcrumb("user tapped sign in button", attributes);
```

#### Kotlin [#kotlin]

```kotlin
val attributes = mutableMapOf<String,Any>("button" to "sign-in", "location" to "LaunchFragment")
NewRelic.recordBreadcrumb("user tapped sign in button", attributes)
```

## iOS

### Syntax [#syntax]

#### Objective-c [#objc]

```objectivec
recordBreadcrumb:(NSString* __nonnull)name attributes:(NSDictionary* __nullable)attributes;
```

#### Swift [#swift]

```swift
NewRelic.recordBreadcrumb(string $Name, map $eventAttributes)
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-crash-event-trail). Mobile breadcrumbs are useful for crash analysis; create them for app activity that you think will help you troubleshoot crashes.

In addition to any custom attributes you choose, the event will also have associated [session attributes](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

Using this call has the same result as using the [`recordCustomEvent` call](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/record-custom-events/) with `MobileBreadcrumb` as the event type. For context on how to use this API, read about sending custom attributes and events:

-   [Objective-C](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/mobile-sdk-api-guide#objc-custom-att-events)
-   [Swift](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/mobile-sdk-api-guide#swift-custom-att-events)

    ### Parameters [#parameters]

    | Parameter          | Type         | Description                                                                                                                                       |
    | ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `$Name`            | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
    | `$eventAttributes` | `dictionary` | 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 [#return-values]

    Returns `true` if the event is recorded successfully, or `false` if not.

    ### Examples [#examples]

    #### Objective-C [#obj-c]

```objectivec
[NewRelic recordBreadcrumb:@"user 11-3435 tapped sign-in button on LaunchViewController"
attributes:@{ @"button" : @"sign-in", @"action" : @"tapped", @"userId" : @"11-3435", @"location" : @"LaunchViewController"}];
```

#### Swift [#swift]

```swift
let eventRecorded = NewRelic.recordBreadcrumb("user 11-3435 tapped sign-in from LaunchViewController",
            attributes:["button" : "sign-in", "userId" : "11-3435", "action" : "tapped", "location" : "LaunchViewController"])
```

## Capacitor

### Syntax [#syntax]

```typescript
recordBreadcrumb(options: { name: string; eventAttributes: object; }) => void
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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 any custom attributes you choose, the event will also have associated [session attributes](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter         | Type     | Description                                                                                                                                       |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`            | `string` | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `eventAttributes` | `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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```typescript
NewRelicCapacitorPlugin.recordBreadcrumb({ name: "shoe", eventAttributes: {"shoeColor": "blue","shoesize": 9,"shoeLaces": true} });
```

## Cordova

### Syntax [#syntax]

```typescript
recordBreadcrumb(eventName: string, attributes?: {[key: string]: boolean | number | string}): void;
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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 any custom attributes you choose, the event will also have associated [session attributes](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter    | Type     | Description                                                                                                                                       |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `eventName`  | String   | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `Attributes` | `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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```js
NewRelic.recordBreadcrumb("shoe", {"shoeColor": "blue","shoesize": 9,"shoeLaces": true});
```

## .NET MAUI

### Syntax [#syntax]

```csharp
RecordBreadcrumb(string name, Dictionary<string, object> attributes): bool;
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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 any custom attributes you choose, the event will also have associated [session attributes](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter    | Type         | Description                                                                                                                                       |
| ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`       | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `Attributes` | `Dictionary` | 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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```csharp
CrossNewRelic.Current.RecordBreadcrumb("MAUIExampleBreadcrumb", new Dictionary<string, object>()
    {
        {"BreadNumValue", 12.3 },
        {"BreadStrValue", "MAUIBread" },
        {"BreadBoolValue", true }
    }
);
```

## Flutter

### Syntax [#syntax]

```dart
recordBreadcrumb(String name,{Map<String, dynamic>? eventAttributes}): void;
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter         | Type         | Description                                                                                                                                       |
| ----------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`            | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `eventAttributes` | `Dictionary` | 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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```dart
NewrelicMobile.instance.recordBreadcrumb("Button Got Pressed on Screen 3");
```

## React Native

### Syntax [#syntax]

```js
recordBreadcrumb(name: string, attributes?: {[key: string]: any}): void;
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter    | Type         | Description                                                                                                                                       |
| ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`       | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `Attributes` | `Dictionary` | 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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```js
NewRelic.recordBreadcrumb("shoe", {"shoeColor": "blue","shoesize": 9,"shoeLaces": true});
```

## Unity

### Syntax [#syntax]

```csharp
RecordBreadcrumb(string name, Dictionary<string, object> attributes): bool;
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter    | Type         | Description                                                                                                                                       |
| ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`       | `string`     | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `Attributes` | `Dictionary` | 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 [#return-values]

Returns `true` if the event is recorded successfully, or `false` if not.

### Example [#example]

```csharp
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("Unity Attribute", "Data1");

NewRelicAgent.RecordBreadCrumb("Unity BreadCrumb Example", dic);
```

## Unreal Engine

### Syntax [#syntax]

```cpp
recordBreadCrumb(FString breadcrumbName);

recordBreadCrumbWithAttributes(FString breadcrumbName, TMap <FString, FString> customData):void
```

### Description [#description]

This call creates and records a `MobileBreadcrumb` event, which can be queried with NRQL and in the [crash event trail](https://docs.newrelic.com/docs/mobile-monitoring/mobile-monitoring-ui/crashes/mobile-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](https://docs.newrelic.com/docs/insights/explore-data/attributes/mobile-default-attributes-insights#mobile-list). Unlike with using [`setAttribute`](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/create-attribute/), adding attributes to a breadcrumb event adds them only to that event; they are not session attributes.

### Parameters [#parameters]

| Parameter        | Type         | Description                                                                                                                                       |
| ---------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `breadcrumbName` | `FString`    | Required. The name you want to give to the breadcrumb event.                                                                                      |
| `Attributes`     | `Dictionary` | Optional. A map that includes a list of attributes of the breadcrumb event. Create attributes for any event descriptors you think will be useful. |

### Example [#example]

```cpp
#include "NewRelicBPLibrary.h"

UNewRelicBPLibrary::.recordBreadCrumb("Unreal Breadcrumb Without Attribute");

TMap<FString, FString> breadCrumbMap;
breadCrumbMap.Add("place", TEXT("Robots"));
breadCrumbMap.Add("user", TEXT("Nisarg"));

UNewRelicBPLibrary::recordBreadCrumbWithAttributes("Unreal Breadcrumb",breadCrumbMap);
```

![Screenshot of the Unreal Engine Plugin Record breadcrumb](https://docs.newrelic.com/images/newrelic_unreal_sdk_record_breadcrumb.webp "Unreal Engine Plugin Record BreadCrumb")
