How to enable and read QueryService logs
How To
Summary
Describes how to enable QueryService logging and the information that QueryService log records provide.
Environment
This document describes QueryService logging for CA 12.0.4. However, it should help understand similar logs for previous CA
versions.
Steps
First read this IBM document to understand how to upload a custom topic.
https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=logging-enabling-diagnostic-different-topics
(https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=logging-enabling-diagnostic-different-topics).
To upload the required custom topic, use a QueryServiceLog.json file with this content:
"loggerDefinitions": [
"loggerName": "com.ibm.bi.qs",
"level": "TRACE",
"additivity": true
],
"topicName": "QueryServiceTrace"
}
Note that level field could be set to either: INFO, DEBUG, or TRACE. In that order, INFO is the less informative and TRACE is the most
informative. Be aware that TRACE is only recommended for cases where a very few requests are at play. Most verbose levels of
logging would negatively impact performance.
QueryService logs are recorded in the dataset-service.log located under <install-dir>/logs.
Additional Information
How to interpret QueryService log records.
Each log record displays its associated level. That is: INFO, DEBUG and TRACE. Therefore, it gives you the sense of what
gets log for each level. Note that each level includes everything up to itself. DEBUG includes both INFO and DEBUG. And
TRACE includes all the records.
Each record has associated an identifier like that highlighted in bold characters in the next example. Using that identifier one
can follow the processing from incoming query specification to outgoing response.
2024-04-22T18:32:57.294-0400 INFO com.ibm.bi (http://com.ibm.bi/).qs.xqe.request.RequestManager [Default Executor-thread-36]
CjG8sv2294dqh2l92GMyhv4q8M92jCCdh2vw84vh CjG8sv2294dqh2l92GMyhv4q8M92jCCdh2vw84vh
lG8sCssM22qslll4hd9lvCjjvlv4qqC9hdwM8jh8 NA 9.46.108.34 63880
AggAAADDHzBmAAAAAAoAAACAHmcP6fuHHh1rFAAAAGCTui+EwH9yOKQYZpDZUkb1/KsPBwAAAFNIQS0yNTYgAAAAa/gcqV5O6FRvoPtI
/LM9QwqrQNuAG9H1tbAdh2wfLOU= /datasets/iCD0304DA844748769F6A91E2D7A96AA7/data query-service 13196 Starting request
[id:a00866b3-e288-4e33-b616-d7d4a11cf9cb:2cb2430b-d247-4341-b00f-3d4d261dffa1, type:V5DataExecutor timeout:290 s],
activeRequests:0
A record may tell you what end point and what method wrote it. In that case one can find a word with this structure endPointName-
methodName. For example: QueryServiceEndPoint-GET:getDatasetData, QueryServiceEndPoint-POST:getDatasetData.
Two of the RequestManager’s records serve to trace data source request execution. This is an example:
2024-04-23T12:02:58.048-0400 INFO com.ibm.bi.qs.xqe.request.RequestManager [Default Executor-thread-91]
G4v8wvsywCs8yj4qvs8Gs2vl9MlsCdsvMs4G224h G4v8wvsywCs8yj4qvs8Gs2vl9MlsCdsvMs4G224h
hjswC984G94sGh8jMM9wsGdqyhjjh8h94llvw4q4 NA 9.46.108.34 53796
AggAAAD+FTFmAAAAAAoAAABWL/LhDGGTfuoDFAAAAGCTui+EwH9yOKQYZpDZUkb1/KsPBwAAAFNIQS0yNTYgAAAAb235AZiqCzWJuaG
STD3OsUNRmYY+rdLmEFEOmx5cn7A= /datasets/i05F3952E1B454D3DBD56340379D04CC4/data query-service 16168
Starting request [id:12c2c03b-89da-4d97-bc45-5772a07e5e3b:4c77135c-15ac-4cbe-964a-5c1cae6a3ce2, type:V5DataExecutor
timeout:290 s], activeRequests:0
2024-04-23T12:03:01.652-0400 INFO com.ibm.bi.qs.xqe.request.RequestManager [Default Executor-thread-91]
G4v8wvsywCs8yj4qvs8Gs2vl9MlsCdsvMs4G224h G4v8wvsywCs8yj4qvs8Gs2vl9MlsCdsvMs4G224h
hjswC984G94sGh8jMM9wsGdqyhjjh8h94llvw4q4 NA 9.46.108.34 53796
AggAAAD+FTFmAAAAAAoAAABWL/LhDGGTfuoDFAAAAGCTui+EwH9yOKQYZpDZUkb1/KsPBwAAAFNIQS0yNTYgAAAAb235AZiqCzWJuaG
STD3OsUNRmYY+rdLmEFEOmx5cn7A= /datasets/i05F3952E1B454D3DBD56340379D04CC4/data query-service 16168
Completed request [id:12c2c03b-89da-4d97-bc45-5772a07e5e3b:4c77135c-15ac-4cbe-964a-5c1cae6a3ce2, type:V5DataExecutor,
elapsedTime:3576 ms]
The first record tells us that if the request is not completed in 290 s or less it will timeout. The second record tells us that the request
was completed in 3.576 s. Note that both share a request id, in this case 12c2c03b-89da-4d97-bc45-5772a07e5e3b:4c77135c-15ac-
4cbe-964a-5c1cae6a3ce2. The activeRequests field on the RequestManager’s starting record informs us about the number of pending
requests.
Both DEBUG and TRACE level provide:
• both the query specification and the response, both in json format,
• the datasetId,
• the moduleConnectionPath,
• the state of refreshmd parameter.
Trace level provides in xml format:
• the V5QuerySet,
• the PlanTree. That is, the execution plan,
• the rendered IV5ResultSet.
The response log for DEBUG level only displays a few elements of it. That is, version, status, built datetime and its identifier. For TRACE
level the full text if the response is logged. Note that built datetime and its identifier could be used to figure out whether a response
has been reused.
Document Information
More support for:
IBM Cognos Analytics (https://www.ibm.com/mysupport/s/topic/0TO500000002PVJGA2)
Component:
Troubleshooting->Logging
Software version:
All Versions
Document number:
7149214
Modified date:
23 April 2024