Tracks a single operation - an HTTP request or an async job - while it is running on this server, so it can be inspected and killed from the server monitoring pages. One is created when the operation starts and removed when it finishes; a short history of errored operations is kept separately by CurrentOperationService. Serialised as a "CurrentOp" element.

Group: Server Monitoring


Properties

PropertyReturnsDescription
attributesMap<String,Object>A bag of temporary attributes for this operation. Delegates to the HTTP request's attributes if this is an HTTP operation, otherwise uses a local map.
blockedbooleanWhether this operation's time limit marks it as blocked outright, rather than merely capped.
branchIdLongThe ID of the branch (website section) this operation is running against, if applicable.
completedAtDateWhen this operation finished.
currentActionOpActionWhat this operation is currently doing, eg executing a SQL statement or an Elasticsearch call.
errorbooleanWhether this operation ended, or has so far logged, an error.
errorMessageStringThe message logged when this operation ended in an error.
httpMethodStringThe HTTP method of the request this operation is handling, eg GET or POST.
httpParamsMap<String,String>The HTTP request parameters for this operation. Returns the params captured at the time of a violation if any were captured, otherwise the live request's current params.
killedbooleanWhether this operation has been flagged to be killed.
operationInfoOperationInfoIdentifying details of this operation - its type, source and item ID.
requestRequestThe HTTP request this operation is handling.
responseResponseThe HTTP response this operation is writing to.
serverNameStringThe name of the server this operation is running on.
stackTraceStackTraceElement[]The stack trace of the operation's thread. While the operation is still running this is the thread's live stack trace; once it has finished this is the stack trace captured at the time of a violation or error, if any.
startedAtDateWhen this operation started.
tenantIdLongThe ID of the tenant organisation this operation is running for.
threadIdStringThe name of the thread this operation is running on.
thrownThrowableThe exception thrown by this operation, if it ended in an error.
timeLimitlongThe maximum time in milliseconds this operation is allowed to run, as calculated by the Governor.
timeLimitExceededbooleanWhether this operation has run for longer than its configured time limit.
topStackList<String>The top few stack frames captured when this operation's stack trace was recorded (eg on a violation), as a quick reference to what it was waiting on.
violationbooleanWhether this operation has been flagged as violating server limits, eg by exceeding its time limit.

Methods

getCurrentAction() · getServerName() · getAttributes() · getBranchId() · getHttpMethod() · getRequest() · getResponse() · getThreadId() · getOperationInfo() · getTenantId() · getStartedAt() · getCompletedAt() · getStackTrace() · getTopStack() · getThrown() · getErrorMessage() · getTimeLimit() · isBlocked() · isTimeLimitExceeded() · isError() · isViolation() · isKilled() · getHttpParams()

getCurrentAction()

Returns: OpAction

What this operation is currently doing, eg executing a SQL statement or an Elasticsearch call.

getServerName()

Returns: String

The name of the server this operation is running on.

getAttributes()

Returns: Map<String,Object>

A bag of temporary attributes for this operation. Delegates to the HTTP request's attributes if this is an HTTP operation, otherwise uses a local map.

getBranchId()

Returns: Long

The ID of the branch (website section) this operation is running against, if applicable.

getHttpMethod()

Returns: String

The HTTP method of the request this operation is handling, eg GET or POST.

getRequest()

Returns: Request

The HTTP request this operation is handling.

getResponse()

Returns: Response

The HTTP response this operation is writing to.

getThreadId()

Returns: String

The name of the thread this operation is running on.

getOperationInfo()

Returns: OperationInfo

Identifying details of this operation - its type, source and item ID.

getTenantId()

Returns: Long

The ID of the tenant organisation this operation is running for.

getStartedAt()

Returns: Date

When this operation started.

getCompletedAt()

Returns: Date

When this operation finished.

getStackTrace()

Returns: StackTraceElement[]

The stack trace of the operation's thread. While the operation is still running this is the thread's live stack trace; once it has finished this is the stack trace captured at the time of a violation or error, if any.

getTopStack()

Returns: List<String>

The top few stack frames captured when this operation's stack trace was recorded (eg on a violation), as a quick reference to what it was waiting on.

getThrown()

Returns: Throwable

The exception thrown by this operation, if it ended in an error.

getErrorMessage()

Returns: String

The message logged when this operation ended in an error.

getTimeLimit()

Returns: long

The maximum time in milliseconds this operation is allowed to run, as calculated by the Governor.

isBlocked()

Returns: boolean

Whether this operation's time limit marks it as blocked outright, rather than merely capped.

isTimeLimitExceeded()

Returns: boolean

Whether this operation has run for longer than its configured time limit.

isError()

Returns: boolean

Whether this operation ended, or has so far logged, an error.

isViolation()

Returns: boolean

Whether this operation has been flagged as violating server limits, eg by exceeding its time limit.

isKilled()

Returns: boolean

Whether this operation has been flagged to be killed.

getHttpParams()

Returns: Map<String,String>

The HTTP request parameters for this operation. Returns the params captured at the time of a violation if any were captured, otherwise the live request's current params.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.