fuchsia.feedback

PROTOCOLS

CrashReporter

Defined in fuchsia.feedback/crash_reporter.fidl

Provides the ability to file crash reports.

File

Files a crash report.

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.

Request

NameType
report CrashReport

Response

NameType
result CrashReporter_File_Result

DataProvider

Defined in fuchsia.feedback/data_provider.fidl

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

GetData

Returns all the feedback data except the screenshot, which is provided separately.

Request

NameType

Response

NameType
result DataProvider_GetData_Result

GetScreenshot

Returns an image of the current view encoded in the provided encoding.

screenshot may be null if the encoding is not supported, the device does not have a display, or there is not enough memory to allocate the screenshot image.

The screenshot is provided separately from the rest of the data as callers might want to block on it before changing the view.

Request

NameType
encoding ImageEncoding

Response

NameType
screenshot Screenshot?

ComponentDataRegister

Defined in fuchsia.feedback/data_register.fidl

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 feedback reports. This is useful for component-specific data in certain products that is not exposed to the rest of the system and that the Feedback service already fetches.

The epitaph ZX_ERR_INVALID_ARGS indicates that the client is attempting to update platform data that are attached by default in feedback reports. The client should use a different namespace or data keys.

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

Upsert

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()): { "chromium": { # namespace "channel": "stable", }, "build": { # namespace "version": "0.2", }, }

then Upsert({ "namespace": "chromium", "annotations": [ "version": "1.2.3.45", "channel": "beta", ] }) would result in the server now holding: { "chromium": { # namespace "channel": "beta", # updated "version": "1.2.3.45" # inserted }, "build": { # 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

NameType
data ComponentData

Response

NameType

DeviceIdProvider

Defined in fuchsia.feedback/device_id_provider.fidl

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.

GetId

Returns the device's feedback ID.

Request

NameType

Response

NameType
result DeviceIdProvider_GetId_Result

STRUCTS

Annotation

Defined in fuchsia.feedback/annotation.fidl

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

NameTypeDescriptionDefault
key string[128] No default
value string[1024] No default

Attachment

Defined in fuchsia.feedback/attachment.fidl

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

NameTypeDescriptionDefault
key string[128] No default
value fuchsia.mem/Buffer No default

CrashReporter_File_Response

Defined in fuchsia.feedback/crash_reporter.fidl

NameTypeDescriptionDefault

DataProvider_GetData_Response

Defined in fuchsia.feedback/data_provider.fidl

NameTypeDescriptionDefault
data Data No default

Screenshot

Defined in fuchsia.feedback/data_provider.fidl

An encoded image of the screen.

NameTypeDescriptionDefault
image fuchsia.mem/Buffer No default
dimensions_in_px fuchsia.math/Size No default

DeviceIdProvider_GetId_Response

Defined in fuchsia.feedback/device_id_provider.fidl

NameTypeDescriptionDefault
feedback_id string[64] No default

ENUMS

ImageEncoding

Type: uint32

Defined in fuchsia.feedback/data_provider.fidl

The encoding used for the image.

Today, only PNG is supported, but in the future the screenshot could be returned in other encodings if need arises.

NameValueDescription
PNG 0

DeviceIdError

Type: uint32

Defined in fuchsia.feedback/device_id_provider.fidl

The DeviceIdError values are returned in the following circumstances:

  • NOT_FOUND - a valid feedback id was not found by the server.
NameValueDescription
NOT_FOUND 1

TABLES

CrashReport

Defined in fuchsia.feedback/crash_reporter.fidl

Represents a crash report.

OrdinalNameTypeDescription
1 program_name string[1024]

The name of the program that crashed, e.g., the process or component's name.

6 program_uptime zx/duration

How long the program was running before it crashed.

2 specific_report SpecificCrashReport

The specific report that depends on the type of crashes.

3 annotations vector<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<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.

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.

GenericCrashReport

Defined in fuchsia.feedback/crash_reporter.fidl

Represents a generic crash report.

OrdinalNameTypeDescription
1 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".

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.

NativeCrashReport

Defined in fuchsia.feedback/crash_reporter.fidl

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

OrdinalNameTypeDescription
1 minidump fuchsia.mem/Buffer

The core dump in the Minidump format.

RuntimeCrashReport

Defined in fuchsia.feedback/crash_reporter.fidl

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

OrdinalNameTypeDescription
1 exception_type string[128]

The exception type, e.g., "FileSystemException".

2 exception_message string[2048]

The exception message, e.g., "cannot open file".

3 exception_stack_trace fuchsia.mem/Buffer

The text representation of the exception stack trace.

Data

Defined in fuchsia.feedback/data_provider.fidl

Data to attach to feedback reports.

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

OrdinalNameTypeDescription
1 annotations vector<Annotation>[64]

A vector of key-value string pairs. Keys are guaranteed to be unique.

3 attachment_bundle Attachment

A bundle of Attachments objects stored as an Attachment itself, e.g., it could be a ZIP archive bundling a vector of Attachment objects.

2

ComponentData

Defined in fuchsia.feedback/data_register.fidl

Component-specific data to attach to feedback reports.

OrdinalNameTypeDescription
1 namespace string[32]

The top-level namespace associated with the data, e.g., "chromium" or "build":

  • intended to group related data together and reduce key collisions across namespaces
  • prefixed to every data key passed within that namespace

Multiple clients may share the same namespace, e.g., there could be multiple Chromium components that want to expose Chromium-related data and they would all use "chromium".

2 annotations vector<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.

UNIONS

CrashReporter_File_Result

Defined in fuchsia.feedback/crash_reporter.fidl

NameTypeDescription
response CrashReporter_File_Response
err zx/status

SpecificCrashReport

Defined in fuchsia.feedback/crash_reporter.fidl

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.

NameTypeDescription
generic GenericCrashReport

Intended for arbitrary crashes, e.g., OOM, out-of-disk.

native NativeCrashReport

Intended for a native exception.

dart RuntimeCrashReport

Intended for a Dart exception.

DataProvider_GetData_Result

Defined in fuchsia.feedback/data_provider.fidl

NameTypeDescription
response DataProvider_GetData_Response
err zx/status

DeviceIdProvider_GetId_Result

Defined in fuchsia.feedback/device_id_provider.fidl

NameTypeDescription
response DeviceIdProvider_GetId_Response
err DeviceIdError

CONSTANTS

NameValueTypeDescription
MAX_PROGRAM_NAME_LENGTH 1024 uint32
MAX_NUM_ANNOTATIONS_PER_CRASH_REPORT 32 uint32
MAX_NUM_ATTACHMENTS_PER_CRASH_REPORT 16 uint32
MAX_EVENT_ID_LENGTH 128 uint32
MAX_CRASH_SIGNATURE_LENGTH 128 uint32
MAX_EXCEPTION_TYPE_LENGTH 128 uint32
MAX_EXCEPTION_MESSAGE_LENGTH 2048 uint32
MAX_NUM_ANNOTATIONS_PROVIDED 64 uint32
MAX_NAMESPACE_LENGTH 32 uint32
MAX_NUM_ANNOTATIONS_PER_NAMESPACE 16 uint32