# TracingConfig

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/TracingConfig.java+class:androidx.webkit.TracingConfig) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

*** ** * ** ***


```
public class TracingConfig
```

<br />

*** ** * ** ***

Holds tracing configuration information and predefined settings for `https://developer.android.com/reference/androidx/webkit/TracingController`.

This class is functionally equivalent to `https://developer.android.com/reference/android/webkit/TracingConfig.html`.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/webkit/TracingConfig.Builder` Builder used to create `https://developer.android.com/reference/androidx/webkit/TracingConfig` objects. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_ALL() = 1` Predefined set of categories, includes all categories enabled by default in chromium. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_ANDROID_WEBVIEW() = 2` Predefined set of categories typically useful for analyzing WebViews. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_FRAME_VIEWER() = 64` Predefined set of categories for studying difficult rendering performance problems. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_INPUT_LATENCY() = 8` Predefined set of categories for analyzing input latency issues. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_JAVASCRIPT_AND_RENDERING() = 32` Predefined set of categories for analyzing javascript and rendering issues. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_NONE() = 0` Indicates that there are no predefined categories. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_RENDERING() = 16` Predefined set of categories for analyzing rendering issues. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#CATEGORIES_WEB_DEVELOPER() = 4` Predefined set of categories typically useful for web developers. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#RECORD_CONTINUOUSLY() = 1` Record trace events continuously using an internal ring buffer. |
| `static final int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#RECORD_UNTIL_FULL() = 0` Record trace events until the internal tracing buffer is full. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#getCustomIncludedCategories()()` Returns the list of included custom category patterns for this configuration. |
| `int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#getPredefinedCategories()()` Returns a bitmask of the predefined category sets of this configuration. |
| `int` | `https://developer.android.com/reference/androidx/webkit/TracingConfig#getTracingMode()()` Returns the tracing mode of this configuration. |

## Constants

### CATEGORIES_ALL

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_ALL = 1
```

Predefined set of categories, includes all categories enabled by default in chromium. Use with caution: this setting may produce large trace output.

### CATEGORIES_ANDROID_WEBVIEW

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_ANDROID_WEBVIEW = 2
```

Predefined set of categories typically useful for analyzing WebViews. Typically includes "android_webview" and "Java" categories.

### CATEGORIES_FRAME_VIEWER

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_FRAME_VIEWER = 64
```

Predefined set of categories for studying difficult rendering performance problems. Typically includes "blink", "compositor", "gpu", "renderer.scheduler", "v8" and some other compositor categories which are disabled by default.

### CATEGORIES_INPUT_LATENCY

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_INPUT_LATENCY = 8
```

Predefined set of categories for analyzing input latency issues. Typically includes "input", "renderer.scheduler" categories..

### CATEGORIES_JAVASCRIPT_AND_RENDERING

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_JAVASCRIPT_AND_RENDERING = 32
```

Predefined set of categories for analyzing javascript and rendering issues. Typically includes "blink", "compositor", "gpu", "renderer.scheduler" and "v8" categories.

### CATEGORIES_NONE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_NONE = 0
```

Indicates that there are no predefined categories.

### CATEGORIES_RENDERING

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_RENDERING = 16
```

Predefined set of categories for analyzing rendering issues. Typically includes "blink", "compositor" and "gpu" categories.

### CATEGORIES_WEB_DEVELOPER

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int CATEGORIES_WEB_DEVELOPER = 4
```

Predefined set of categories typically useful for web developers. Typically includes "blink", "compositor", "renderer.scheduler" and "v8" categories.

### RECORD_CONTINUOUSLY

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int RECORD_CONTINUOUSLY = 1
```

Record trace events continuously using an internal ring buffer. Default tracing mode.

Overwrites old events if they exceed buffer capacity. Uses less memory than the `https://developer.android.com/reference/androidx/webkit/TracingConfig#RECORD_UNTIL_FULL()` mode. Depending on the implementation typically allows up to 64k events to be stored.

### RECORD_UNTIL_FULL

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public static final int RECORD_UNTIL_FULL = 0
```

Record trace events until the internal tracing buffer is full.

Typically the buffer memory usage is larger than `https://developer.android.com/reference/androidx/webkit/TracingConfig#RECORD_CONTINUOUSLY()`. Depending on the implementation typically allows up to 256k events to be stored.

## Public methods

### getCustomIncludedCategories

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public @NonNull List<String> getCustomIncludedCategories()
```

Returns the list of included custom category patterns for this configuration.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` | Empty list if no custom category patterns are specified. |

### getPredefinedCategories

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public int getPredefinedCategories()
```

Returns a bitmask of the predefined category sets of this configuration.

| Returns |
|---|---|
| `int` | Bitmask of predefined category sets. |

### getTracingMode

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
public int getTracingMode()
```

Returns the tracing mode of this configuration.

| Returns |
|---|---|
| `int` | The tracing mode of this configuration. |