Audit Class |
public class Audit
The Audit type exposes the following members.
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| LogAIChatAudit | Audit an AI Chat exchange (one user message and its final reply). Token usage is taken from the agent's last exchange, the detail is the chat title. | |
| LogAudit | Execute the audit script for a given event | |
| LogEventAudit | Audit an event | |
| LogReportAudit | Audit a report execution | |
| LogToDatabase | Default audit implementation: inserts the audit record into the 'sr_audit' table of the data source having a name starting with 'Audit'. The table is created on first use and upgraded automatically when new columns are introduced. Called by the default Audit Script; a custom script can also call it (Model.LogToDatabase()) before or after its own processing. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| AIAgentName | For AI Chat events, name of the AI agent | |
| AICalls | For AI Chat events, number of API calls of the exchange | |
| AICost | For AI Chat events, cost of the exchange based on the provider token costs | |
| AIInputTokens | For AI Chat events, number of input tokens of the exchange | |
| AIMessageCount | For AI Chat events, number of messages in the chat | |
| AIModel | For AI Chat events, name of the AI model used | |
| AIOutputTokens | For AI Chat events, number of output tokens of the exchange | |
| AIProvider | For AI Chat events, name of the AI provider used | |
| AIToolCalls | For AI Chat events, number of tool calls of the exchange | |
| AuditScriptTemplate | Default template of the Audit Script proposed in the server configuration | |
| CheckTableCreation | If true, the existence of the 'sr_audit' table is checked (and the table created or upgraded if necessary) on the next audit. Reset to false after the first check. | |
| Detail | Detail of the event | |
| Duration | Duration in seconds for events without a Report (e.g. AI Chat exchanges). When Report is set, the report execution duration is used instead. | |
| Error | Error message if the event is an error | |
| Path | Path involved in the event (e.g. report file path) | |
| Report | Report involved in the event or null | |
| Schedule | Report schedule involved in the event or null | |
| Type | Type of the audit event | |
| User | Security user involved in the event |