<br />

Added: 7

## **PROTOCOLS**

## ComponentDataRegister

*Defined in [fuchsia.feedback/data_register.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_register.fidl;l=18)*

Registers data useful to attach in feedback reports (crash, user feedback or bug reports).

This can be used by components to augment the data attached to all feedback reports. By default
the Feedback service attaches data exposed to the platform. This protocol is useful for data
known by certain components in certain products, but that is not exposed to the platform.

The epitaph ZX_ERR_INVALID_ARGS indicates that the client is sending invalid requests. See
below for each request why they might be invalid.

The epitaph ZX_ERR_NO_RESOURCES indicates that the server can no longer store additional
component data and will not service new connections.

<br />

### Upsert

Upserts, i.e. updates or inserts, extra component data to be included in feedback reports.

The namespace and each annotation key are used to decide whether to update or insert an
annotation. If an annotation is already present for a given key within the same namespace,
update the value, otherwise insert the annotation with that key under that namespace.

For instance, assuming these are the data already held by the server (from previous calls
to Upsert()):

    {
      "bar": { # namespace
        "channel": "stable",
      },
      "foo": { # namespace
        "version": "0.2",
      }
    }

then:

    Upsert({
      "namespace": "bar",
      "annotations": [
        "version": "1.2.3.45",
        "channel": "beta",
      ]
    })

would result in the server now holding:

    {
      "bar": { # namespace
        "channel": "beta", # updated
        "version": "1.2.3.45" # inserted
      },
      "foo": { # namespace
        "version": "0.2", # untouched
      }
    }

Note that the server will only hold at most MAX_NUM_ANNOTATIONS_PER_NAMESPACE distinct
annotation keys per namespace, picking up the latest values.

#### Request

| Name | Type |
|---|---|
| `data` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#ComponentData` |

#### Response

\<EMPTY\>

## CrashReporter

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=11)*

Provides the ability to file crash reports.

<br />

### FileReport

Files a crash `report` and gives the final result of the operation.

This could mean generating a crash report in a local crash report
database or uploading the crash report to a remote crash server
depending on the FIDL server's configuration.

Warning: this could potentially take up to several minutes. Calling
this function in a synchronous manner is not recommended.
Added: 11

#### Request

| Name | Type |
|---|---|
| `report` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#CrashReport` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#CrashReporter_FileReport_Result` |

## CrashReportingProductRegister

*Defined in [fuchsia.feedback/crash_register.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_register.fidl;l=13)*

Allows a component to choose a different crash reporting product to file crashes for that
component under.

By default, all crashes detected by the platform are filed under a single product on the crash
server. This API allows components to choose their own product while still benefiting from the
platform's exception handling and crash reporting.

<br />

### Upsert

Upserts, i.e. updates or inserts, a crash reporting product for a given component URL.

A subsequent call to Upsert() for the same component URL overwrites the
`CrashReportingProduct` for that component.

Prefer UpsertWithAck() if the component also files crash reports itself, to avoid race
conditions and mis-attribution.

#### Request

| Name | Type |
|---|---|
| `component_url` | `string:2083` |
| `product` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#CrashReportingProduct` |

### UpsertWithAck

Upserts (see above) and notifies the client when the operation is complete.

This allows clients to prevent races between filing crash reports and calls to Upsert.
Otherwise if a crash report is filed before the upsert completes, the crash report will be
attributed to the wrong product, leading to potentially incorrect crash data.

#### Request

| Name | Type |
|---|---|
| `component_url` | `string:2083` |
| `product` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#CrashReportingProduct` |

#### Response

\<EMPTY\>

## DataProvider

*Defined in [fuchsia.feedback/data_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=11)*

Provides data useful to attach to feedback reports, e.g., a crash report filed by the system, a
user feedback report filed by a user or a bug report filed by a developer.

<br />

### GetAnnotations

Returns a set of annotations about the device's state.

`annotations` may be empty if there was an issue collecting them.

These are the same annotations as provided through GetSnapshot() - some clients only want
the annotations while others want both the annotations and the snapshot and generating the
snapshot can take significantly more time than collecting the annotations, e.g., logs are
only part of the snapshot and not part of the annotations and can take some time.

#### Request

| Name | Type |
|---|---|
| `params` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#GetAnnotationsParameters` |

#### Response

| Name | Type |
|---|---|
| `annotations` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#Annotations` |

### GetSnapshot

Returns a snapshot of the device's state.

`snapshot` may be empty if there was an issue generating the snapshot.

#### Request

| Name | Type |
|---|---|
| `params` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#GetSnapshotParameters` |

#### Response

| Name | Type |
|---|---|
| `snapshot` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#Snapshot` |

## DeviceIdProvider

*Defined in [fuchsia.feedback/device_id_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/device_id_provider.fidl;l=12)*

Provides the device's feedback ID.

The feedback ID is a persisted UUID used to group feedback reports. The ID
is not intended to be used for any reporting purposes other than feedback,
e.g., not intended to be used for telemetry.

<br />

### GetId

Returns the device's feedback ID.

This method follows the hanging-get pattern and won't return a value until the ID since the
last call has changed.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `feedback_id` | `string:64` |

## LastRebootInfoProvider

*Defined in [fuchsia.feedback/last_reboot_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/last_reboot_info.fidl;l=11)*

Get information about why a device last shutdown. The term reboot is used instead of shutdown
since many developers phrase their questions about shutdowns in terms of reboots and most
components are interested in knowing why the system just rebooted.

<br />

### Get

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `last_reboot` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#LastReboot` |

## **STRUCTS**

### Annotation

*Defined in [fuchsia.feedback/annotation.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/annotation.fidl;l=23)*

An annotation and its plain ASCII string key.
Annotations are short strings, e.g., the board name or the build version.
Added: 23

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `key` | `string:128` |   | No default |
| `value` | `string:1024` |   | No default |

### Attachment [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/attachment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/attachment.fidl;l=10)*

An attachment and its plain ASCII string key.
Attachments are larger objects, e.g., log files. They may be binary or text data.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `key` | `string:128` |   | No default |
| `value` | `https://fuchsia.dev/reference/fuchsia.mem//https://fuchsia.dev/reference/fuchsia.mem#Buffer` |   | No default |

### CrashReporter_FileReport_Response

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=23)*

| Field | Type | Description | Default |
|---|---|---|---|
| `results` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#FileReportResults` |   | No default |

## **ENUMS**

### FilingError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=232)*
Added: 11

<br />

| Name | Value | Description |
|---|---|---|
| ### UNKNOWN | `0` |   |
| ### INVALID_ARGS_ERROR | `1` |   |
| ### SERVER_ERROR | `2` |   |
| ### PERSISTENCE_ERROR | `3` |   |
| ### QUOTA_REACHED_ERROR | `4` |   |

### FilingSuccess [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=222)*

"Memory" refers to a non-persistent location, e.g. a memory-backed
filesystem.
Added: 11

<br />

| Name | Value | Description |
|---|---|---|
| ### UNKNOWN | `0` |   |
| ### REPORT_UPLOADED | `1` |   |
| ### REPORT_ON_DISK | `2` |   |
| ### REPORT_IN_MEMORY | `3` |   |
| ### REPORT_NOT_FILED_USER_OPTED_OUT | `4` |   |

### RebootReason [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint16`

*Defined in [fuchsia.feedback/last_reboot_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/last_reboot_info.fidl;l=59)*

Reasons why a device last rebooted.

<br />

| Name | Value | Description |
|---|---|---|
| ### UNKNOWN | `0` | The client will get this value if the server is sending a new enum value that the client was not compiled with. Added: 9 |
| ### COLD | `2` | The device booted from a cold state. This is most likely the result of an extended period of time without power or a device booting with Fuchsia for the first time. |
| ### BRIEF_POWER_LOSS | `3` | The device rebooted due to a brief loss of power. On some hardware this could be the result of a user disconnecting, then reconnecting their device's power supply in rapid succession. |
| ### BROWNOUT | `4` | The device rebooted because its voltage dipped below an allowable level without going to 0. |
| ### KERNEL_PANIC | `5` |   |
| ### SYSTEM_OUT_OF_MEMORY | `6` |   |
| ### HARDWARE_WATCHDOG_TIMEOUT | `7` |   |
| ### SOFTWARE_WATCHDOG_TIMEOUT | `8` |   |
| ### ROOT_JOB_TERMINATION | `19` | The device rebooted because the userspace root job was terminated, most likely because one of its critical processes crashed. |
| ### USER_HARD_RESET | `28` | The device rebooted because the user intentionally held the power button to hard reset it. Added: 31 |
| ### SPONTANEOUS_REBOOT_DURING_SHUTDOWN | `32` | The device rebooted spontaneously during a graceful shutdown. Added: HEAD |
| ### USER_REQUEST | `9` | The device rebooted because the end user of the device initiated the reboot. DO NOT USE for any code path not directly related to an end user explicit reboot action. Use DEVELOPER_REQUEST below instead. |
| ### USER_REQUEST_DEVICE_STUCK | `26` | The device rebooted because the end user of the device initiated the reboot because the device was stuck. Added: 31 |
| ### DEVELOPER_REQUEST | `22` | The device rebooted because a developer initiated the reboot, typically via a shell command or similar interface, including within an automated test. Added: 28 |
| ### RETRY_SYSTEM_UPDATE | `17` | The device rebooted because applying the OTA failed and we want to retry. |
| ### HIGH_TEMPERATURE | `11` | The device rebooted because it was determined to be too hot. |
| ### SESSION_FAILURE | `12` | The device rebooted because of an issue with a session or because the session manager was unable to recover from an error. |
| ### SYSMGR_FAILURE | `15` | The device rebooted because the system manager (sysmgr) was unable to recover from an error. |
| ### FACTORY_DATA_RESET | `14` | The device rebooted following a data reset to factory defaults. See [fuchsia.recovery.FactoryReset](https://fuchsia.dev/reference/fidl/fuchsia.feedback#fuchsia.recovery.FactoryReset). |
| ### CRITICAL_COMPONENT_FAILURE | `16` | The device rebooted because a critical component managed by sysmgr has failed. |
| ### ZBI_SWAP | `18` | The device rebooted to apply the swap of Zircon boot images. |
| ### ANDROID_UNEXPECTED_REASON | `21` | An Android-initiated reboot reason that Starnix doesn't recognize. Added: 28 |
| ### ANDROID_NO_REASON | `25` | An Android-initiated shutdown that Starnix doesn't know the reason for. Added: 30 |
| ### ANDROID_RESCUE_PARTY | `23` | The device rebooted because Android called for the "RescueParty". Added: 29 |
| ### ANDROID_CRITICAL_PROCESS_FAILURE | `24` | The device rebooted because one of Android critical processes failed. Added: 29 |
| ### BATTERY_DRAINED | `27` | The device battery is drained. Added: 31 |
| ### SUSPENSION_FAILURE | `29` | The system failed to suspend or resume within the expected time. Added: 32 |
| ### CRITICAL_DRIVER_FAILURE | `30` | The device rebooted because a critical driver has failed. Added: HEAD |
| ### POWER_LEVEL_TRANSITION_STUCK | `31` | The system failed to transition between power levels within the expected time. Added: HEAD |
| ### SYSTEM_UPDATE | `10` | The device rebooted because of an OTA. |
| ### NETSTACK_MIGRATION | `20` | The Netstack component is changing versions. Removed: 33 Added: 26 |

### ShutdownAction [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.feedback/last_reboot_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/last_reboot_info.fidl;l=194)*

How a device last shutdown.
Added: 29

<br />

| Name | Value | Description |
|---|---|---|
| ### POWEROFF | `1` |   |
| ### REBOOT | `2` |   |
| ### REBOOT_TO_RECOVERY | `3` |   |
| ### REBOOT_TO_BOOTLOADER | `4` |   |

## **TABLES**

### Annotations

*Defined in [fuchsia.feedback/data_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=75)*

Annotations about the device's state.

Clients typically upload the data straight to servers. So the data comes in the form of
arbitrary key-value pairs that clients can directly forward to the servers.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 2 | `annotations2` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.feedback#Annotation>:512` | A vector of key-value string pairs. Keys are guaranteed to be unique. Added: 25 |

### ComponentData

*Defined in [fuchsia.feedback/data_register.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_register.fidl;l=71)*

Data known to a component, but not exposed to the platform, to attach to feedback reports.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `namespace` | `string:32` | The top-level namespace associated with the data: - Is intended to group related data together and reduce data key collisions across namespaces. - May be shared by multiple clients, e.g., there could be multiple clients within the same component or across components that want to expose related data and they would all use the same namespace. - Will be prefixed to every data key passed within that namespace in all feedback reports, e.g., the annotation "version" would appear as "foo.version" in all feedback reports if the namespace is "foo". - Must match \[a-z-\]+, i.e. only lowercase letters and hyphens or this will result in a ZX_ERR_INVALID_ARGS epitaph. - Must not match a reserved namespace used internally for platform data, e.g., "build", or this will result in a ZX_ERR_INVALID_ARGS epitaph. The list of reserved namespaces is internal and subject to change for now. |
| ### 2 | `annotations` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.feedback#Annotation>:16` | A vector of key-value string pairs, e.g., `<"version", "1.2.3.45">`. Keys: - Should be unique as only the latest value for a given key in the vector will be considered. - Must match \[a-z-.\]+, i.e. only lowercase letters, hyphens and periods. Use periods for sub-namespacing, e.g., "build.label" and "build.type", so that related annotations are grouped together (here related to "build") when sorted lexicographically. |

### CrashReport [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=37)*

Represents a crash report.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `program_name` | `string:1024` | The name of the program that crashed, e.g., the process or component's name. Internally, the program name is used to persist the report in case it can't be uploaded immediately. As a result, it's sanitized when used as a filesystem path, e.g., stripped of any fuchsia-pkg:// prefix. ZX_ERR_INVALID_ARGS will be returned if the sanitized program name is any of the following: - "" - "." - ".." |
| ### 2 | `specific_report` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#SpecificCrashReport` | The specific report that depends on the type of crashes. This field should be set if additional information about the crashing program needs to be sent, e.g., a minidump. |
| ### 3 | `annotations` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.feedback#Annotation>:32` | A vector of key-value string pairs representing arbitrary data that should be attached to a crash report. Keys should be unique as only the latest value for a given key in the vector will be considered. |
| ### 4 | `attachments` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.feedback#Attachment>:16` | A vector of key-value string-to-VMO pairs representing arbitrary data that should be attached to a crash report. Keys should be unique as only the latest value for a given key in the vector will be considered. ZX_ERR_INVALID_ARGS will be returned if any of the following is true: - a key is "" - a key is "." - a key is ".." - a key contains a forward slash "/" - a key contains a space " " - a key contains characters other than printable ASCII - a key is reserved for use by Feedback: - annotations.json - minidump.dmp - snapshot_uuid.txt - snapshot.zip - uploadFileMinidump |
| ### 5 | `event_id` | `string:128` | A text ID that the crash server can use to group multiple crash reports related to the same event. Unlike the crash signature, crash reports sharing the same ID correspond to different crashes, but can be considered as belonging to the same event, e.g., a crash in a low-level server causing a crash in a high-level UI widget. |
| ### 6 | `program_uptime` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | How long the program was running before it crashed. |
| ### 7 | `crash_signature` | `string:128` | A text signature that the crash server can use to track the same crash over time, e.g., "kernel-panic" or "oom". This signature will take precedence over any automated signature derived from the rest of the data. Unlike the event ID, crash reports sharing the same signature correspond to the same crash, but happening over multiple events, e.g., a null pointer exception in a server whenever asked the same request. Must match \[a-z\]\[a-z-\]\* i.e. only lowercase letters and hyphens or this will result in a ZX_ERR_INVALID_ARGS epitaph. |
| ### 8 | `is_fatal` | `bool` | Indicates whether the crash report is for the atypical stop of a running process, component, or the system itself. Examples of events that result in fatal crash reports are: - an ELF process crashing - the system rebooting because it ran out of memory. - the system rebooting because a critical component crashed. - the system rebooting because the device was too hot. Examples of events that result in non-fatal crash reports are: - an uncaught exception in a Dart program with many execution contexts. The runtime may chose to terminate that specific execution context and file a crash report for it instead of the whole program. - a component detecting a fatal event (like an OOM) may occur soon, but isn't guaranteed to occur. This field is primarily used for grouping crashes by fatal, not fatal, and unknown, each corresponding to the field being set to true, set to false, or not set respectively. |
| ### 9 | `weight` | `uint32` | Optional. Used to indicate that this report represents more than just this instance of the crash. For example, this field should be set to 10 if choosing to only file 1 out of every 10 instances of this crash type. A weight of 1 is used if the field is not set. An explicitly set value of 0 is invalid and will be rejected. Added: 28 |

### CrashReportingProduct

*Defined in [fuchsia.feedback/crash_register.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_register.fidl;l=42)*

Product information to report to the crash server.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `string` | The product name on the crash server. - The first character has to be alphanumeric. The remaining characters must be printable, but cannot be a space, which leaves values 33 to 127 in the ASCII table. Any other characters will result in a ZX_ERR_INVALID_ARGS epitaph. - Missing this required field will result in a ZX_ERR_INVALID_ARGS epitaph. |
| ### 2 | `version` | `string` | Optional product version of the component. - The first character has to be alphanumeric. The remaining characters must be printable, but cannot be a space, which leaves values 33 to 127 in the ASCII table. Any other characters will result in a ZX_ERR_INVALID_ARGS epitaph. If no version is specified then none is reported to the crash server. |
| ### 3 | `channel` | `string` | Optional product release channel for the component, e.g., "canary", "beta", "stable". If no channel is specified then none is reported to the crash server. |

### FileReportResults

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=211)*
Added: 11

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `result` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#FilingSuccess` | The success type. |
| ### 2 | `report_id` | `string:64` | A non-empty value if \|result\| is FilingSuccess::REPORT_UPLOADED. |

### GetAnnotationsParameters

*Defined in [fuchsia.feedback/data_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=41)*

Parameters for the DataProvider::GetAnnotations() method.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `collection_timeout_per_annotation` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | Annotations are collected in parallel from various places in the platform, each with a timeout. `collection_timeout_per_annotation` allows clients to control how much time is given to each annotation collection. It enables clients to get a partial set of annotations under a certain time. |

### GetSnapshotParameters [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/data_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=52)*

Parameters for the DataProvider::GetSnapshot() method.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `collection_timeout_per_data` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | A snapshot aggregates various data from the platform (device uptime, logs, Inspect data, etc.) that are collected in parallel. Internally, each data collection is done within a timeout. `collection_timeout_per_data` allows clients to control how much time is given to each data collection. It enables clients to get a partial yet valid snapshot under a certain time. Note that this does not control how much total time the snapshot generation may take, which is by construction higher than `collection_timeout_per_data`, as clients can control the total time by using a timeout on the call to GetSnapshot() on their side. |
| ### 2 | `response_channel` | `handle<channel>` | If set, the snapshot archive will be sent as a \|fuchsia.io.File\| over this channel instead of being set in the \|archive\| field in the \|Snapshot\| response. This is typically useful if the client is on the host and does not support VMOs. |

### LastReboot

*Defined in [fuchsia.feedback/last_reboot_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/last_reboot_info.fidl;l=18)*

Information about why a device last rebooted.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `graceful` | `bool` | Whether the last reboot was graceful, i.e. the device didn't reboot in response to an error and rebooted in a controlled manner. This field allows clients to know whether the last reboot was graceful without having to parse the optional \|reason\| field. This is useful when \|reason\| is not set, i.e. because the system doesn't know more than the fact that the reboot was graceful, or when the API evolves to support new RebootReason values and the clients hasn't been updated yet. This field is always has a value if \|reason\| is provided. However, \|reason\| might not always have a value this field is provided. |
| ### 2 | `reason` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#RebootReason` | Why a device last rebooted. |
| ### 3 | `uptime` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | The uptime of the device before it rebooted. This is the amount of time since boot, including any time spent in suspend-to-idle. |
| ### 4 | `planned` | `bool` | Whether the last reboot was planned, i.e. the device rebooted in accordance to a schedule applied by the system. This field allows clients to know whether the last reboot was planned without having to parse the \|reason\| field. Planned reboots are by nature, graceful. Added: 26 |
| ### 5 | `runtime` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` | The runtime of the device before it rebooted. This is the amount of time since boot excluding any time spent in suspend-to-idle. Added: 27 |
| ### 6 | `action` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#ShutdownAction` | How a device last shutdown. Added: 29 |

### NativeCrashReport [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=156)*

Represents a crash report for a native exception out of which the client has built a minidump.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `minidump` | `https://fuchsia.dev/reference/fuchsia.mem//https://fuchsia.dev/reference/fuchsia.mem#Buffer` | The core dump in the Minidump format. |
| ### 2 | `process_name` | `string:64` | The name of the crashed process. |
| ### 3 | `process_koid` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Koid` | The kernel object id of the crashed process. |
| ### 4 | `thread_name` | `string:64` | The name of the crashed thread. |
| ### 5 | `thread_koid` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Koid` | The kernel object id of the crashed thread. |

### RuntimeCrashReport [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=180)*

Represents a crash report for a runtime exception, applicable to most languages.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `exception_type` | `string:128` | The exception type, e.g., "FileSystemException". |
| ### 2 | `exception_message` | `string:4096` | The exception message, e.g., "cannot open file". |
| ### 3 | `exception_stack_trace` | `https://fuchsia.dev/reference/fuchsia.mem//https://fuchsia.dev/reference/fuchsia.mem#Buffer` | The text representation of the exception stack trace. |

### Snapshot [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/data_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=85)*

Snapshot about the device's state.

Clients typically upload the data straight to servers. So the data comes in the form of
arbitrary key-value pairs that clients can directly forward to the servers.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `archive` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#Attachment` | A \<filename, ZIP archive\> pair. The ZIP archive contains several files corresponding to the various data it collected from the platform. There is typically one file for all the annotations (device uptime, build version, etc.) and one file per attachment (logs, Inspect data, etc.). Not set if \|response_channel\| was set in the request. |
| ### 3 | `annotations2` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.feedback#Annotation>:512` | A vector of key-value string pairs. Keys are guaranteed to be unique. While the annotations are included in the ZIP archive itself, some clients also want them separately to index or augment them so we provide them separately as well. Added: 25 |

### TextBacktraceCrashReport [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=193)*

Represents a crash report with a text stack trace.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `fuchsia_backtrace` | `https://fuchsia.dev/reference/fuchsia.mem//https://fuchsia.dev/reference/fuchsia.mem#Buffer` | The text representation of the backtrace in Fuchsia's symbolization markup format. |
| ### 2 | `process_name` | `string:64` | The name of the crashed process. |
| ### 3 | `process_koid` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Koid` | The kernel object id of the crashed process. |
| ### 4 | `thread_name` | `string:64` | The name of the crashed thread. |
| ### 5 | `thread_koid` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Koid` | The kernel object id of the crashed thread. |

## **UNIONS**

### CrashReporter_FileReport_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=23)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#CrashReporter_FileReport_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#FilingError` |   |

<br />

### SpecificCrashReport [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.feedback/crash_reporter.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=140)*

Represents a specific crash report.

Add a new member when the server needs to special case how it handles certain annotations and
attachments for a given type of crashes, e.g., a `RuntimeCrashReport` for Javascript.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 2 | `native` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#NativeCrashReport` | Intended for a native exception. |
| ### 3 | `dart` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#RuntimeCrashReport` | Intended for a Dart exception. |
| ### 4 | `text_backtrace` | `https://fuchsia.dev/reference/fidl/fuchsia.feedback#TextBacktraceCrashReport` | Intended for a text stack trace in Fuchsia's symbolization markup format. Added: HEAD |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [MAX_ANNOTATION_KEY_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/annotation.fidl;l=8) | `128` | `uint64` | Maximum length for an annotation's key. Added: 23 |
| [MAX_ANNOTATION_VALUE_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/annotation.fidl;l=12) | `1024` | `uint64` | Maximum length for an annotation's value. Added: 23 |
| [MAX_CRASH_SIGNATURE_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=32) | `128` | `uint32` |   |
| [MAX_EVENT_ID_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=31) | `128` | `uint32` |   |
| [MAX_EXCEPTION_MESSAGE_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=177) | `4096` | `uint32` | Added: 10 |
| [MAX_EXCEPTION_TYPE_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=173) | `128` | `uint32` |   |
| [MAX_NAMESPACE_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_register.fidl;l=67) | `32` | `uint32` |   |
| [MAX_NUM_ANNOTATIONS2_PROVIDED](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_provider.fidl;l=37) | `512` | `uint32` | Added: 25 |
| [MAX_NUM_ANNOTATIONS_PER_CRASH_REPORT](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=29) | `32` | `uint32` |   |
| [MAX_NUM_ANNOTATIONS_PER_NAMESPACE](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/data_register.fidl;l=68) | `16` | `uint32` |   |
| [MAX_NUM_ATTACHMENTS_PER_CRASH_REPORT](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=30) | `16` | `uint32` |   |
| [MAX_PROCESS_NAME_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=152) | `64` | `uint32` |   |
| [MAX_PROGRAM_NAME_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=28) | `1024` | `uint32` |   |
| [MAX_REPORT_ID_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=34) | `64` | `uint32` | Added: 11 |
| [MAX_THREAD_NAME_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.feedback/crash_reporter.fidl;l=153) | `64` | `uint32` |   |