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

PropertyReturnsDescription
asyncTasksbooleanWhether this session captures asynchronous jobs and other background tasks.
createdAtDateTime this session was created.
createdByProfileIdlongId of the profile that created this session.
expiryDateTime at which this session stops matching operations and is treated as expired.
hostNameStringHost name filter for web request capture: when set, only requests to this host are matched.
loggingClassesSet<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.
loggingLevelIntegerMinimum severity level, as a log4j Level.intLevel() value, that this session's operations are logged at.
notesStringFree text notes attached to this session, as set on the builder.
pathPrefixStringPath prefix filter for web request capture: when set, only requests whose path starts with this value are matched.
performanceDataBoolean
performanceDataEnabledbooleanTrue only if performance (stopwatch) data collection was explicitly enabled for this session. Sessions recorded before this option existed will report false.
sessionIdStringUnique identifier for this debug session, generated as a random seven-character string when the session is created.
stoppedbooleanWhether 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.
stopReasonStringExplanation of why this session was automatically stopped, when isStopped is true.
taskNameStringTask name filter for async task capture: when set, only tasks whose source matches this value are captured.
tenantIdlongId of the tenant this debug session belongs to.
thisSessionBooleanWhether this session should only capture web requests carrying this session's id in a debugSessionId cookie.
titleStringDisplay title for this session, as set on the builder.
webRequestsbooleanWhether 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.

ParameterDescription
classesthe 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.

ParameterDescription
btrue to capture async tasks

hostName(String b)

Returns: DebugSessionBuilder

Sets the host name filter for web request capture.

ParameterDescription
bthe host name to match, or null to match any host

pathPrefix(String b)

Returns: DebugSessionBuilder

Sets the path prefix filter for web request capture.

ParameterDescription
bthe 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.

ParameterDescription
btrue to restrict capture to requests carrying this session's cookie

expiry(Date b)

Returns: DebugSessionBuilder

Sets the exact time at which the session expires.

ParameterDescription
bthe session's expiry time

expiryMins(int mins)

Returns: DebugSessionBuilder

Sets the session to expire the given number of whole minutes from now.

ParameterDescription
minsminutes 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.

ParameterDescription
minsminutes 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.

ParameterDescription
bthe task name to match, or null to match any task

webRequests(boolean b)

Returns: DebugSessionBuilder

Sets whether the session should capture web requests.

ParameterDescription
btrue 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.

ParameterDescription
asyncTaskstrue to capture async tasks

title(String title)

Returns: DebugSessionBuilder

Sets the display title for the session.

ParameterDescription
titlethe session's title

notes(String notes)

Returns: DebugSessionBuilder

Sets free text notes for the session.

ParameterDescription
notesthe 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.

ParameterDescription
loggingLevelthe logging level threshold, or null to use the default of Level.INFO.intLevel()
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.