Fluent builder for configuring a new DebugSession before it is started. Obtained from DebugManager.newDebugSessionBuilder, configured with the capture filters and options for the session, then passed to DebugManager.addSession to activate it.
Group: Builders
Extends: DebugSession
Inherited from DebugSession
Properties
| Property | Returns | Description |
|---|---|---|
| asyncTasks | boolean | Whether this session captures asynchronous jobs and other background tasks. |
| createdAt | Date | Time this session was created. |
| createdByProfileId | long | Id of the profile that created this session. |
| expiry | Date | Time at which this session stops matching operations and is treated as expired. |
| hostName | String | Host name filter for web request capture: when set, only requests to this host are matched. |
| loggingClasses | Set<String> | Simple class names for which enhanced logging should be activated while this session is active. Checked by isEnhancedLogging, though nothing in the platform currently calls that method, so setting it has no observable effect. |
| loggingLevel | Integer | Minimum severity level, as a log4j Level.intLevel() value, that this session's operations are logged at. |
| notes | String | Free text notes attached to this session, as set on the builder. |
| pathPrefix | String | Path prefix filter for web request capture: when set, only requests whose path starts with this value are matched. |
| performanceData | Boolean | |
| performanceDataEnabled | boolean | True only if performance (stopwatch) data collection was explicitly enabled for this session. Sessions recorded before this option existed will report false. |
| sessionId | String | Unique identifier for this debug session, generated as a random seven-character string when the session is created. |
| stopped | boolean | Whether this session was automatically stopped by one of its protective limits, such as exceeding the maximum operation count or captured file size for the session. |
| stopReason | String | Explanation of why this session was automatically stopped, when isStopped is true. |
| taskName | String | Task name filter for async task capture: when set, only tasks whose source matches this value are captured. |
| tenantId | long | Id of the tenant this debug session belongs to. |
| thisSession | Boolean | Whether this session should only capture web requests carrying this session's id in a debugSessionId cookie. |
| title | String | Display title for this session, as set on the builder. |
| webRequests | boolean | Whether this session captures web requests. |
Methods
getSessionId() · getTitle() · getThisSession() · getHostName() · getPathPrefix() · getExpiry() · getTenantId() · isWebRequests() · isAsyncTasks() · getTaskName() · isStopped() · getStopReason() · getCreatedAt() · getCreatedByProfileId() · getLoggingClasses() · getLoggingLevel() · getNotes()
getSessionId()
Returns: String
Unique identifier for this debug session, generated as a random seven-character string when the session is created.
getTitle()
Returns: String
Display title for this session, as set on the builder.
getThisSession()
Returns: Boolean
Whether this session should only capture web requests carrying this session's id in a debugSessionId cookie.
getHostName()
Returns: String
Host name filter for web request capture: when set, only requests to this host are matched.
getPathPrefix()
Returns: String
Path prefix filter for web request capture: when set, only requests whose path starts with this value are matched.
getExpiry()
Returns: Date
Time at which this session stops matching operations and is treated as expired.
getTenantId()
Returns: long
Id of the tenant this debug session belongs to.
isWebRequests()
Returns: boolean
Whether this session captures web requests.
isAsyncTasks()
Returns: boolean
Whether this session captures asynchronous jobs and other background tasks.
getTaskName()
Returns: String
Task name filter for async task capture: when set, only tasks whose source matches this value are captured.
isStopped()
Returns: boolean
Whether this session was automatically stopped by one of its protective limits, such as exceeding the maximum operation count or captured file size for the session.
getStopReason()
Returns: String
Explanation of why this session was automatically stopped, when isStopped is true.
getCreatedAt()
Returns: Date
Time this session was created.
getCreatedByProfileId()
Returns: long
Id of the profile that created this session.
getLoggingClasses()
Returns: Set<String>
Simple class names for which enhanced logging should be activated while this session is active. Checked by isEnhancedLogging, though nothing in the platform currently calls that method, so setting it has no observable effect.
getLoggingLevel()
Returns: Integer
Minimum severity level, as a log4j Level.intLevel() value, that this session's operations are logged at.
getNotes()
Returns: String
Free text notes attached to this session, as set on the builder.
Methods
loggingClasses(Collection<String> classes) · asyncTasks(boolean b) · hostName(String b) · pathPrefix(String b) · thisSession(Boolean b) · expiry(Date b) · expiryMins(int mins) · expiryMins(double mins) · taskName(String b) · webRequests(boolean b) · setAsyncTasks(boolean asyncTasks) · title(String title) · notes(String notes) · loggingLevel(Integer loggingLevel)
loggingClasses(Collection<String> classes)
Returns: DebugSessionBuilder
Sets the class names to activate enhanced logging for while the session is active.
| Parameter | Description |
|---|---|
classes | the simple class names to enhance logging for, or null or empty to clear the setting |
asyncTasks(boolean b)
Returns: DebugSessionBuilder
Sets whether the session should capture asynchronous jobs and other background tasks.
| Parameter | Description |
|---|---|
b | true to capture async tasks |
hostName(String b)
Returns: DebugSessionBuilder
Sets the host name filter for web request capture.
| Parameter | Description |
|---|---|
b | the host name to match, or null to match any host |
pathPrefix(String b)
Returns: DebugSessionBuilder
Sets the path prefix filter for web request capture.
| Parameter | Description |
|---|---|
b | the path prefix to match, or null to match any path |
thisSession(Boolean b)
Returns: DebugSessionBuilder
Sets whether the session should only capture web requests carrying this session's id in a debugSessionId cookie.
| Parameter | Description |
|---|---|
b | true to restrict capture to requests carrying this session's cookie |
expiry(Date b)
Returns: DebugSessionBuilder
Sets the exact time at which the session expires.
| Parameter | Description |
|---|---|
b | the session's expiry time |
expiryMins(int mins)
Returns: DebugSessionBuilder
Sets the session to expire the given number of whole minutes from now.
| Parameter | Description |
|---|---|
mins | minutes from now until the session expires |
expiryMins(double mins)
Returns: DebugSessionBuilder
Sets the session to expire the given number of minutes, including fractional minutes, from now.
| Parameter | Description |
|---|---|
mins | minutes from now until the session expires; converted to whole seconds before use |
taskName(String b)
Returns: DebugSessionBuilder
Sets the task name filter for async task capture.
| Parameter | Description |
|---|---|
b | the task name to match, or null to match any task |
webRequests(boolean b)
Returns: DebugSessionBuilder
Sets whether the session should capture web requests.
| Parameter | Description |
|---|---|
b | true to capture web requests |
setAsyncTasks(boolean asyncTasks)
Returns: void
Sets whether the session should capture asynchronous jobs and other background tasks. Unlike asyncTasks, this is a plain setter and does not return the builder for chaining.
| Parameter | Description |
|---|---|
asyncTasks | true to capture async tasks |
title(String title)
Returns: DebugSessionBuilder
Sets the display title for the session.
| Parameter | Description |
|---|---|
title | the session's title |
notes(String notes)
Returns: DebugSessionBuilder
Sets free text notes for the session.
| Parameter | Description |
|---|---|
notes | the session's notes |
loggingLevel(Integer loggingLevel)
Returns: DebugSessionBuilder
Sets the minimum severity level, as a log4j Level.intLevel() value, that the session's operations are logged at.
| Parameter | Description |
|---|---|
loggingLevel | the logging level threshold, or null to use the default of Level.INFO.intLevel() |