Activity Tracing

Log trace messages to an auto-generated ring buffer while associating them with the originating user action.

Overview

Finding and diagnosing bugs in your app can be difficult. The Activity Tracing APIs provide a mechanism for grouping and labeling work that's done in response to user interactions or other events, so that you may easily determine the underlying cause of a crash.

Topics

Creating and Accessing Activities

os_activity_apply

Execute a block using a given activity object.

os_activity_apply_f

Execute a given function with a provided activity.

os_activity_end

Ends the specified activity on the current thread.

Deprecated
os_activity_get_active

Returns the stack of nested activities associated with the current thread.

Deprecated
os_activity_get_identifier

Returns the current activity identifier.

os_activity_scope_enter

Pushes the current execution context to use the provided activity.

os_activity_scope_leave

Pops the current execution context.

Leaving Breadcrumbs

os_activity_set_breadcrumb

Flags the current activity as a breadcrumb, to signify an interesting event.

Generating Trace Messages

os_trace_debug_enabled

Returns whether debug level trace information is enabled.

Deprecated
os_trace_info_enabled

Returns whether info level trace information is enabled.

Deprecated
os_trace_type_enabled

Returns whether the specified info level trace information is enabled.

Deprecated

Enumerations

Data Types

os_signpost_type_t

The values that determine the role of a signpost.

os_signpost_id_t

An identifier you use to distinguish signposts that have the same name and log to the same log.

os_breadcrumb_tDeprecated

See Also

Logs

Logging

Efficiently capture log messages to memory and disk. Manage logging behavior and persistence.