Monitoring

Monitoring applications and databases is essential to track the load and resources used by the system.

Memgraph currently supports:

  1. Real-time logs tracking via WebSocket server: Log tracking is helpful for debugging purposes and monitoring the database operations.
  2. Metrics tracking via HTTP server (Enterprise Edition): In the Enterprise edition, besides log tracking, Memgraph allows tracking information about transactions, query latencies, types of queries executed, snapshot recovery latencies, triggers, TTL data, Bolt messages, indexes, streams, memory, operators and sesions. There are also many metrics which are trying to describe the state of high availability. These include metrics which describe latencies of RPC messages, time needed to perform a failover and counters for events occurring throughout the lifetime of HA Memgraph.

Real-time logs tracking via WebSocket server

Connect to Memgraph’s logging server via WebSocket to forward logs to all the connected clients.

Log messages

Each log that is written to the log file is forwarded to the connected clients in the following format:

{
  event: "log",
  level: "trace"|"debug"|"info"|"warning"|"error"|"critical",
  message: "<log-message>"
}

Connection

To connect to Memgraph’s WebSocket server, use the following URL:

ws://host:port

The default host is 0.0.0.0, but it can be changed using the --monitoring-address= configuration flag.

The default port is 7444, but it can be changed using the --monitoring-port configuration flag.

To connect to Memgraph’s WebSocket server using the default configuration and Python client, you can use the following code snippet:

import asyncio
import websockets
 
HOST = 'localhost'
PORT = '7444'
 
# The WebSocket URL
ws_url = f'ws://{HOST}:{PORT}'
 
async def read_logs():
    async with websockets.connect(ws_url) as websocket:
        print(f"Connected to Memgraph at {ws_url}")
        try:
            # Keep reading messages (logs) from the server
            while True:
 log_message = await websocket.recv()
                print(log_message)
        except websockets.exceptions.ConnectionClosed:
            print("Connection to Memgraph closed.")
 
asyncio.run(read_logs())

The code structure is similar in other languages, depending on the WebSocket library used.

If you want to connect with a WebSocket Secure (WSS) connection, set the --bolt-cert-file and --bolt-key-file configuration flags to enable an SSL connection. Refer to the configuration page to learn how to update the configuration and to see the list of all available configuration flags.

Authentication

When authentication is not used due to no users present in Memgraph, no authentication message is expected, and no response will be returned.

When the authentication is used, Memgraph won’t send a message to a certain connection until it’s authenticated.

To authenticate, create a JSON with the credentials in the following format:

{
  "username": "<username>",
  "password": "<password>"
}

If the credentials are valid, the connection will be made, and the client will receive the messages. As a response, the client should receive the following message:

{
  "success": true,
  "message": "User has been successfully authenticated!"
}

If they are invalid or the first message is in an invalid format, the connection is dropped. As a response, the following message is sent:

{
  "success": false,
  "message": "<error-message>"
}

To use WebSocket to authenticate, send the JSON message to the WebSocket server:

import asyncio
import json
import websockets
 
HOST = "localhost"
PORT = "7444"
USERNAME = "memgraph"
PASSWORD = "memgraph"
 
ws_url = f"ws://{HOST}:{PORT}"
 
 
async def authenticate_and_read_logs(websocket):
    # Send authentication credentials
    credentials = json.dumps({"username": USERNAME, "password": PASSWORD})
    await websocket.send(credentials)
 
    # Wait for authentication response
    response = await websocket.recv()
    response_data = json.loads(response)
    if response_data.get("success"):
        print("Authentication successful!")
    else:
        print(f"Authentication failed: {response_data.get('message')}")
        return  # Stop if authentication fails
 
    # After successful authentication, start reading logs
    try:
        while True:
            log_message = await websocket.recv()
            print(log_message)
    except websockets.exceptions.ConnectionClosed:
        print("Connection to Memgraph closed.")
 
 
async def connect_and_authenticate():
    async with websockets.connect(ws_url) as websocket:
        print(f"Connected to Memgraph at {ws_url}")
        await authenticate_and_read_logs(websocket)
 
 
asyncio.run(connect_and_authenticate())

Authorization (Enterprise)

Permission for connecting through WebSocket is controlled by the WEBSOCKET privilege.

Metrics tracking via HTTP server (Enterprise Edition)

In the Enterprise Edition, Memgraph allows tracking information about high availability, transactions, query latencies, snapshot recovery latencies, triggers, Bolt messages, indexes, streams, memory, operators and sesions, all by using using an HTTP server.

To retrieve data from the HTTP server, enter a valid Memgraph Enterprise license key.

The default address and port for the metrics server is 0.0.0.0:9091, and can be configured using the --metrics-address and --metrics-port configuration flags.

To retrieve the metrics, send a GET request to the following URL:

http://host:port

Here is an example of how to retrieve metrics using Python:

import requests
import json
 
 
def fetch_memgraph_metrics():
    metrics_url = "http://0.0.0.0:9091/metrics"
 
    try:
    response = requests.get(metrics_url, timeout=5) 
 
        if response.status_code == 200:
            try:
                metrics_data = json.loads(response.text)
                pretty_metrics = json.dumps(metrics_data, indent=4)
                print("Memgraph Metrics:\n", pretty_metrics)
            except json.JSONDecodeError:
                print("Memgraph Metrics:\n", response.text)
        else:
            print(f"Failed to fetch metrics. Status code: {response.status_code}")
    except requests.exceptions.RequestException as e:
        print(f"An error occurred: {e}")
 
 
fetch_memgraph_metrics()

The example above will print the metric similar to the example response below.

System metrics

All system metrics measuring different parts of the system can be divided into three different types:

  • Gauge - a single value of some variable in the system (e.g. memory usage)
  • Counter (uint64_t) - a value that can be incremented or decremented (e.g. number of active transactions in the system)
  • Histogram (uint64_t) - distribution of measured values (e.g. certain percentile of query latency on N measured queries)

General metrics

NameTypeDescription
average_degreeCounterAverage number of relationships of a single node.
disk_usageGaugeAmount of disk space used by the data directory (in bytes).
edge_countCounterNumber of relationships stored in the system.
memory_usageGaugeAmount of RAM used reported by the OS (in bytes).
peak_memory_usageGaugePeak amount of RAM used reported by the OS (in bytes).
unreleased_delta_objectsCounterNumber of unreleased delta objects.
vertex_countCounterNumber of nodes stored in the system.
SocketConnect_us_50pHistogramLatency of connecting to the socket, 50th percentile.
SocketConnect_us_90pHistogramLatency of connecting to the socket, 90th percentile.
SocketConnect_us_99pHistogramLatency of connecting to the socket, 99th percentile.

Index metrics

NameTypeDescription
ActiveLabelIndicesCounterNumber of active label indexes in the system.
ActiveLabelPropertyIndicesCounterNumber of active label property indexes in the system.
ActivePointIndicesCounterNumber of active point indices in the system.
ActiveTextIndicesCounterNumber of active text indexes in the system.

Operator metrics

Before a Cypher query is executed, it is converted into an internal form suitable for execution, known as a query plan. A query plan is a tree-like data structure describing a pipeline of operations that will be performed on the database in order to yield the results for a given query. Every node within a plan is known as a logical operator and describes a particular operation.

NameTypeDescription
OnceOperatorCounterNumber of times Once operator was used.
CreateNodeOperatorCounterNumber of times CreateNode operator was used.
CreateExpandOperatorCounterNumber of times CreateExpand operator was used.
ScanAllOperatorCounterNumber of times ScanAll operator was used.
ScanAllByLabelOperatorCounterNumber of times ScanAllByLabel operator was used.
ScanAllByLabelPropertiesOperatorCounterNumber of times ScanAllByLabelProperties operator was used.
ExpandOperatorCounterNumber of times Expand operator was used.
ExpandVariableOperatorCounterNumber of times ExpandVariable operator was used.
ConstructNamedPathOperatorCounterNumber of times ConstructNamedPath operator was used.
FilterOperatorCounterNumber of times Filter operator was used.
ProduceOperatorCounterNumber of times Produce operator was used.
DeleteOperatorCounterNumber of times Delete operator was used.
SetPropertyOperatorCounterNumber of times SetProperty operator was used.
SetPropertiesOperatorCounterNumber of times SetProperties operator was used.
SetLabelsOperatorCounterNumber of times SetLabels operator was used.
RemovePropertyOperatorCounterNumber of times RemoveProperty operator was used.
RemoveLabelsOperatorCounterNumber of times RemoveLabels operator was used.
EdgeUniquenessFilterOperatorCounterNumber of times EdgeUniquenessFilter operator was used.
EmptyResultOperatorCounterNumber of times EmptyResult operator was used.
AccumulateOperatorCounterNumber of times Accumulate operator was used.
AggregateOperatorCounterNumber of times Aggregate operator was used.
SkipOperatorCounterNumber of times Skip operator was used.
LimitOperatorCounterNumber of times Limit operator was used.
OrderByOperatorCounterNumber of times OrderBy operator was used.
MergeOperatorCounterNumber of times Merge operator was used.
OptionalOperatorCounterNumber of times Optional operator was used.
UnwindOperatorCounterNumber of times Unwind operator was used.
DistinctOperatorCounterNumber of times Distinct operator was used.
UnionOperatorCounterNumber of times Union operator was used.
CartesianOperatorCounterNumber of times Cartesian operator was used.
CallProcedureOperatorCounterNumber of times CallProcedureOperator operator was used.
ForeachOperatorCounterNumber of times Foreach operator was used.
EvaluatePatternFilterOperatorCounterNumber of times EvaluatePatternFilter operator was used.
ApplyOperatorCounterNumber of times Apply operator was used.
HashJoinCounterNumber of times HashJoin operator was used.
IndexedJoinCounterNumber of times IndexedJoin operator was used.
PeriodicCommitCounterNumber of times PeriodicCommit operator was used.
PeriodicSubqueryCounterNumber of times PeriodicSubquery operator was used.
RollUpApplyOperatorCounterNumber of times RollUpApply operator was used.
ScanAllByEdgeIdOperatorCounterNumber of times ScanAllByEdgeId operator was used.
ScanAllByEdgeOperatorCounterNumber of times ScanAllByEdge operator was used.
ScanAllByEdgeTypeOperatorCounterNumber of times ScanAllByEdgeType operator was used.
ScanAllByEdgeTypePropertyOperatorCounterNumber of times ScanAllByEdgeTypeProperty operator was used.
ScanAllByEdgeTypePropertyRangeOperatorCounterNumber of times ScanAllByEdgeTypePropertyRange operator was used.
ScanAllByEdgeTypePropertyValueOperatorCounterNumber of times ScanAllByEdgeTypePropertyValue operator was used.
ScanAllByPointDistanceOperatorCounterNumber of times ScanAllByPointDistance operator was used.
ScanAllByPointWithinbboxOperatorCounterNumber of times ScanAllByPointWithinbbox operator was used.

Query metrics

NameTypeDescription
QueryExecutionLatency_us_50pHistogramQuery execution latency in microseconds (50th percentile).
QueryExecutionLatency_us_90pHistogramQuery execution latency in microseconds (90th percentile).
QueryExecutionLatency_us_99pHistogramQuery execution latency in microseconds (99th percentile).

Query type metrics

NameTypeDescription
ReadQueryCounterNumber of read-only queries executed.
WriteQueryCounterNumber of write-only queries executed.
ReadWriteQueryCounterNumber of read-write queries executed.

Session metrics

NameTypeDescription
ActiveSessionsCounterNumber of active connections.
ActiveBoltSessionsCounterNumber of active Bolt connections.
ActiveTCPSessionsCounterNumber of active TCP connections.
ActiveSSLSessionsCounterNumber of active SSL connections.
ActiveWebSocketSessionsCounterNumber of active websocket connections.
BoltMessagesCounterNumber of Bolt messages sent.

Snapshot metrics

NameTypeDescription
SnapshotCreationLatency_us_50pHistogramSnapshot creation latency in microseconds (50th percentile).
SnapshotCreationLatency_us_90pHistogramSnapshot creation latency in microseconds (90th percentile).
SnapshotCreationLatency_us_99pHistogramSnapshot creation latency in microseconds (99th percentile).
SnapshotRecoveryLatency_us_50pHistogramSnapshot recovery latency in microseconds (50th percentile).
SnapshotRecoveryLatency_us_90pHistogramSnapshot recovery latency in microseconds (90th percentile).
SnapshotRecoveryLatency_us_99pHistogramSnapshot recovery latency in microseconds (99th percentile).

Stream metrics

NameTypeDescription
StreamsCreatedCounterNumber of streams created.
MessagesConsumedCounterNumber of consumed streamed messages.

Transaction metrics

NameTypeDescription
ActiveTransactionsCounterNumber of active transactions.
CommitedTransactionsCounterNumber of committed transactions.
RollbackedTransactionsCounterNumber of rollbacked transactions.
FailedQueryCounterNumber of times executing a query failed (either during parse time or runtime).
FailedPrepareCounterNumber of times preparing a query failed.
FailedPullCounterNumber of times pulling a query failed.
SuccessfulQueryCounterNumber of successful queries.

Trigger metrics

NameTypeDescription
TriggersCreatedCounterNumber of Triggers created.
TriggersExecutedCounterNumber of Triggers executed.

TTL metrics

NameTypeDescription
DeletedNodesCounterNumber of deleted TTL edges.
DeletedEdgesCounterNumber of deleted TTL nodes.

HA metrics

NameTypeDescription
AppendDeltasRpc_us_50pHistogramAppendDeltasRpc latency in microseconds (50th percentile).
AppendDeltasRpc_us_90pHistogramAppendDeltasRpc latency in microseconds (90th percentile).
AppendDeltasRpc_us_99pHistogramAppendDeltasRpc latency in microseconds (99th percentile).
CurrentWalRpc_us_50pHistogramCurrentWalRpc latency in microseconds (50th percentile).
CurrentWalRpc_us_90pHistogramCurrentWalRpc latency in microseconds (90th percentile).
CurrentWalRpc_us_99pHistogramCurrentWalRpc latency in microseconds (99th percentile).
WalFilesRpc_us_50pHistogramWalFilesRpc latency in microseconds (50th percentile).
WalFilesRpc_us_90pHistogramWalFilesRpc latency in microseconds (90th percentile).
WalFilesRpc_us_99pHistogramWalFilesRpc latency in microseconds (99th percentile).
ReplicaStream_us_50pHistogramTime needed to construct AppendDeltasRpc stream (50th percentile).
ReplicaStream_us_90pHistogramTime needed to construct AppendDeltasRpc stream (90th percentile).
ReplicaStream_us_99pHistogramTime needed to construct AppendDeltasRpc stream (99th percentile).
SnapshotRpc_us_50pHistogramSnapshotRpc latency in microseconds (50th percentile).
SnapshotRpc_us_90pHistogramSnapshotRpc latency in microseconds (90th percentile).
SnapshotRpc_us_99pHistogramSnapshotRpc latency in microseconds (99th percentile).
FrequentHeartbeatRpc_us_50pHistogramFrequentHeartbeatRpc latency in microseconds (50th percentile).
FrequentHeartbeatRpc_us_90pHistogramFrequentHeartbeatRpc latency in microseconds (90th percentile).
FrequentHeartbeatRpc_us_99pHistogramFrequentHeartbeatRpc latency in microseconds (99th percentile).
HeartbeatRpc_us_50pHistogramHeartbeatRpc latency in microseconds (50th percentile).
HeartbeatRpc_us_90pHistogramHeartbeatRpc latency in microseconds (90th percentile).
HeartbeatRpc_us_99pHistogramHeartbeatRpc latency in microseconds (99th percentile).
SystemRecoveryRpc_us_50pHistogramSystemRecoveryRpc latency in microseconds (50th percentile).
SystemRecoveryRpc_us_90pHistogramSystemRecoveryRpc latency in microseconds (90th percentile).
SystemRecoveryRpc_us_99pHistogramSystemRecoveryRpc latency in microseconds (99th percentile).
ChooseMostUpToDateInstance_us_50pHistogramChooseMostUpToDateInstance latency in microseconds (50th percentile).
ChooseMostUpToDateInstance_us_90pHistogramChooseMostUpToDateInstance latency in microseconds (90th percentile).
ChooseMostUpToDateInstance_us_99pHistogramChooseMostUpToDateInstance latency in microseconds (99th percentile).
GetHistories_us_50pHistogramGetHistories latency in microseconds (50th percentile).
GetHistories_us_90pHistogramGetHistories latency in microseconds (90th percentile).
GetHistories_us_99pHistogramGetHistories latency in microseconds (99th percentile).
InstanceFailCallback_us_50pHistogramInstanceFailCallback latency in microseconds (50th percentile).
InstanceFailCallback_us_90pHistogramInstanceFailCallback latency in microseconds (90th percentile).
InstanceFailCallback_us_99pHistogramInstanceFailCallback latency in microseconds (99th percentile).
InstanceSuccCallback_us_50pHistogramInstanceSuccCallback latency in microseconds (50th percentile).
InstanceSuccCallback_us_90pHistogramInstanceSuccCallback latency in microseconds (90th percentile).
InstanceSuccCallback_us_99pHistogramInstanceSuccCallback latency in microseconds (99th percentile).
DemoteMainToReplicaRpc_us_50pHistogramDemoteMainToReplicaRpc latency in microseconds (50th percentile).
DemoteMainToReplicaRpc_us_90pHistogramDemoteMainToReplicaRpc latency in microseconds (90th percentile).
DemoteMainToReplicaRpc_us_99pHistogramDemoteMainToReplicaRpc latency in microseconds (99th percentile).
EnableWritingOnMainRpc_us_50pHistogramEnableWritingOnMainRpc latency in microseconds (50th percentile).
EnableWritingOnMainRpc_us_90pHistogramEnableWritingOnMainRpc latency in microseconds (90th percentile).
EnableWritingOnMainRpc_us_99pHistogramEnableWritingOnMainRpc latency in microseconds (99th percentile).
GetDatabaseHistoriesRpc_us_50pHistogramGetDatabaseHistoriesRpc latency in microseconds (50th percentile).
GetDatabaseHistoriesRpc_us_90pHistogramGetDatabaseHistoriesRpc latency in microseconds (90th percentile).
GetDatabaseHistoriesRpc_us_99pHistogramGetDatabaseHistoriesRpc latency in microseconds (99th percentile).
PromoteToMainRpc_us_50pHistogramPromoteToMainRpc latency in microseconds (50th percentile).
PromoteToMainRpc_us_90pHistogramPromoteToMainRpc latency in microseconds (90th percentile).
PromoteToMainRpc_us_99pHistogramPromoteToMainRpc latency in microseconds (99th percentile).
RegisterReplicaOnMainRpc_us_50pHistogramRegisterReplicaOnMainRpc latency in microseconds (50th percentile).
RegisterReplicaOnMainRpc_us_90pHistogramRegisterReplicaOnMainRpc latency in microseconds (90th percentile).
RegisterReplicaOnMainRpc_us_99pHistogramRegisterReplicaOnMainRpc latency in microseconds (99th percentile).
StateCheckRpc_us_50pHistogramStateCheckRpc latency in microseconds (50th percentile).
StateCheckRpc_us_90pHistogramStateCheckRpc latency in microseconds (90th percentile).
StateCheckRpc_us_99pHistogramStateCheckRpc latency in microseconds (99th percentile).
UnregisterReplicaRpc_us_50pHistogramUnregisterReplicaRpc latency in microseconds (50th percentile).
UnregisterReplicaRpc_us_90pHistogramUnregisterReplicaRpc latency in microseconds (90th percentile).
UnregisterReplicaRpc_us_99pHistogramUnregisterReplicaRpc latency in microseconds (99th percentile).
BecomeLeaderSuccessCounterThe number of times coordinators successfully became leaders.
FailedToBecomeLeaderCounterThe number of times coordinators failed to become leaders.
SuccessfulFailoversCounterThe number of times failover was done successfully.
RaftFailedFailoversCounterThe number of times failover failed because writing to Raft failed.
NoAliveInstanceFailedFailoversCounterThe number of times failover failed because no instance was alive.
ShowInstanceCounterThe number of times SHOW INSTANCE query was called.
ShowInstancesCounterThe number of times SHOW INSTANCES query was called.
DemoteInstanceCounterThe number of times the user manually demoted instance.
UnregisterReplInstanceCounterThe number of times the user tried to unregister replication instance.
RemoveCoordInstanceCounterThe number of times the user tried to remove coordinator instance.
StateCheckRpcFailCounterThe number of times coordinators received unsuccessful or no response to StateCheckRpc.
StateCheckRpcSuccessCounterThe number of times coordinators received successful response to StateCheckRpc.
UnregisterReplicaRpcFailCounterThe number of times coordinators received unsuccessful or no response to UnregisterReplicaRpc.
UnregisterReplicaRpcSuccessCounterThe number of times coordinators received successful response to UnregisterReplicaRpc.
EnableWritingOnMainRpcFailCounterThe number of times coordinators received unsuccessful or no response to EnableWritingOnMainRpc.
EnableWritingOnMainRpcSuccessCounterThe number of times coordinators received successful response to EnableWritingOnMainRpc.
PromoteToMainRpcFailCounterThe number of times coordinators received unsuccessful or no response to PromoteToMainRpc.
PromoteToMainRpcSuccessCounterThe number of times coordinators received successful response to PromoteToMainRpc.
DemoteMainToReplicaRpcFailCounterThe number of times coordinators received unsuccessful or no response to DemoteMainToReplicaRpc.
DemoteMainToReplicaRpcSuccessCounterThe number of times coordinators received successful response to DemoteMainToReplicaRpc.
RegisterReplicaOnMainRpcFailCounterThe number of times coordinators received unsuccessful or no response to RegisterReplicaOnMainRpc.
RegisterReplicaOnMainRpcSuccessCounterThe number of times coordinators received successful response to RegisterReplicaOnMainRpc.
SwapMainUUIDRpcFailCounterThe number of times coordinators received unsuccessful or no response to SwapMainUUIDRpc.
SwapMainUUIDRpcSuccessCounterThe number of times coordinators received successful response to SwapMainUUIDRpc.
GetDatabaseHistoriesRpcFailCounterThe number of times coordinators received unsuccessful or no response to GetDatabaseHistoriesRpc.
GetDatabaseHistoriesRpcSuccessCounterThe number of times coordinators received successful response to GetDatabaseHistoriesRpc.

All HA metrics with type Counter are aggregated for all coordinators. That makes it easier for users to track what is going on since they don’t need to aggregate by their own metrics specific to each coordinators. Also, after every pull, HA metrics with type Counter are in Memgraph reset to 0. This makes it possible to use Gauge on the client side without worrying that on restart we will lose all data.

Prometheus exporter

Memgraph also supports exporting metrics in the Prometheus format. For more information on how to set up the Prometheus exporter, refer to the Prometheus exporter repository.

Session trace

A session refers to a temporary, interactive connection from a client (either a user or an application) to the database server. It used to execute a series of transactions and queries. Session trace is a feature in Memgraph that allows you to profile the execution of all queries within a session, providing detailed information on query planning and execution. This can be invaluable for understanding performance bottlenecks and optimizing database interactions.

Before enabling session trace, you need to define a directory where the session logs will be stored. This is done using the --query-log-directory configuration flag, which can be set either at Memgraph startup via the command line, or during an active session. By default, --query-log-directory is set to /var/log/memgraph/session_trace.

To set the query log directory while launching from the command line using Docker, do the following:

docker run -p 7687:7687 -p 7444:7444 --name memgraph memgraph/memgraph --query-log-directory {directory}

To set the query log directory interactively, use the following command:

SET DATABASE SETTING "query-log-directory" TO "{directory}";

Replace {directory} with the desired path inside the Memgraph environment, either native or within a container.

If this directory is not set, you will receive the following error when attempting to enable session trace:

The flag --query-log-directory has to be present in order to enable session trace.

Once the query log directory is configured, you can enable session trace for your current session using the following command:

SET SESSION TRACE ON;

This command initiates logging for the session, and the result will include the unique session UUID being tracked:

session uuid
”de9c907b-6675-40bd-bf09-d4ce7b24f22d”

This UUID is used to identify the session log file.

Understanding the Session Trace Log

The session trace log captures detailed information for every query executed during the session, including:

  • Session UUID: Unique identifier for the session.
  • Transaction ID: ID of the current query transaction.
  • User Name: The user executing the query.
  • Query Name and Explain Plan: The name and execution plan of the query.
  • Query Planning and Execution Timings: Start and end timestamps, as well as execution times for query planning and execution.
  • Commit Timings: Start and end timestamps, and execution time for query commit.
  • Profile Plan and Metadata: Detailed profiling information and metadata for the query.

This detailed logging helps in profiling the entire session workload, increasing visibility into potential performance bottlenecks without congesting the system log.

Accessing the Log File

The session trace log is stored at {--query-log-directory}/{session uuid}.log, where --query-log-directory is the directory you defined earlier, and session uuid is the UUID obtained when session trace was enabled.

To stop logging additional information for the current session, use the following command:

SET SESSION TRACE OFF;

After executing this command, no further data will be written to the session trace log for the active session.