# TracingConfig

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/webkit/TracingConfig "View this page in Java")

<br />

```
class TracingConfig
```

<br />

*** ** * ** ***

Holds tracing configuration information and predefined settings for[TracingController](https://developer.android.com/reference/kotlin/androidx/webkit/TracingController).

This class is functionally equivalent to[android.webkit.TracingConfig](https://developer.android.com/reference/android/webkit/TracingConfig.html).

## Summary

|                                                                                                                 ### Nested types                                                                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[TracingConfig.Builder](https://developer.android.com/reference/kotlin/androidx/webkit/TracingConfig.Builder) Builder used to create[TracingConfig](https://developer.android.com/reference/kotlin/androidx/webkit/TracingConfig)objects. |

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

|                                                                                                                                    ### Public functions                                                                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>` | [getCustomIncludedCategories](https://developer.android.com/reference/kotlin/androidx/webkit/TracingConfig#getCustomIncludedCategories())`()` Returns the list of included custom category patterns for this configuration. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                 | [getPredefinedCategories](https://developer.android.com/reference/kotlin/androidx/webkit/TracingConfig#getPredefinedCategories())`()` Returns a bitmask of the predefined category sets of this configuration.              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                 | [getTracingMode](https://developer.android.com/reference/kotlin/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)  

```
const val CATEGORIES_ALL = 1: Int
```

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)  

```
const val CATEGORIES_ANDROID_WEBVIEW = 2: Int
```

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)  

```
const val CATEGORIES_FRAME_VIEWER = 64: Int
```

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)  

```
const val CATEGORIES_INPUT_LATENCY = 8: Int
```

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)  

```
const val CATEGORIES_JAVASCRIPT_AND_RENDERING = 32: Int
```

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)  

```
const val CATEGORIES_NONE = 0: Int
```

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)  

```
const val CATEGORIES_RENDERING = 16: Int
```

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)  

```
const val CATEGORIES_WEB_DEVELOPER = 4: Int
```

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)  

```
const val RECORD_CONTINUOUSLY = 1: Int
```

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[RECORD_UNTIL_FULL](https://developer.android.com/reference/kotlin/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)  

```
const val RECORD_UNTIL_FULL = 0: Int
```

Record trace events until the internal tracing buffer is full.

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

## Public functions

### getCustomIncludedCategories

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

```
fun getCustomIncludedCategories(): (Mutable)List<String!>
```

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

|                                                                                                                                           Returns                                                                                                                                           |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.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)  

```
fun getPredefinedCategories(): Int
```

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

|                                   Returns                                   |
|-----------------------------------------------------------------------------|--------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Bitmask of predefined category sets. |

### getTracingMode

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

```
fun getTracingMode(): Int
```

Returns the tracing mode of this configuration.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-----------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The tracing mode of this configuration. |