Editar

Partilhar via


Analyzing Stopped Session Telemetry

Note

Azure Active Directory is now Microsoft Entra ID. Learn more

In Business Central, a background session is session without a UI that runs a specified codeunit. Background sessions are started and stopped by calling the StartSession and StopSession methods from AL. With Business Central online, sessions can be stopped by using the admin center, which indirectly calls the StopSession method. For more information, see Managing Sessions.

With Application Insights, you can record when sessions are stopped, either by direct calls to the StopSession method or from the admin center.

The StopSession method was invoked on session

A session was stopped by a direct call to the StopSession method from AL or from the admin center.

General dimensions

This table explains the columns included in trace emitted when a session is stopped.

Dimension Description or value
message The StopSession method was invoked on session {stoppingSessionID}
operation_Name StopSessionOperation
severityLevel 1

CustomDimensions

The following table describes the most relevant custom dimensions of the trace.

Column Description or value
eventId RT0029
alObjectId* The ID of the object that called the StopSession method to cancel the session
alObjectName* The name of the object that called the StopSession method to cancel the session
alObjectType* The type of the object, like codeunit or page, called by the StopSession method to cancel the session
alStackTrace* The stack trace for the session stop in AL.
cancellationComment The comment defined in the StopSession method call. Stopped by management PowerShell cmdlet means that the session was stopped from the Business Central admin center.
clientType The type of client that called the Stop Session method such as Background, WebClient, or ManagementClient. ManagementClient indicates that the session was canceled from the Business Central admin center. For a list of the client types, see ClientType Option Type.
companyName* The name of the company that was open during the session
currentSessionID The ID of the session that called the StopSession method to stop the session identified by stoppingSessionID.
extensionName The name of the extension that included the code that called the StopSession method.
result The return value of the StopSession method call.
stoppingSessionID The ID of the session that was stopped by the StopSession method call
stoppingSessionIsAdmin Indicates whether the session that was stopped was running as an administrator
See common custom dimensions

* Not shown for sessions canceled from the admin center.

Other custom dimensions

The following table explains other custom dimensions os the trace.

Dimension Description or value
aadTenantId The Microsoft Entra tenant ID that's used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
component Dynamics 365 Business Central Server
componentVersion The version number of the component that emits telemetry (see the component dimension)
environmentName The name of the tenant environment. See Managing Environments. This dimension isn't included for Business Central on-premises environments.
environmentType The environment type for the tenant, such as Production, Sandbox, Trial. See Environment Types
telemetrySchemaVersion The version of the Business Central telemetry schema

See also

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Monitoring and Analyzing Long Running SQL Queries On-Premises
The Business Central Administration Center