2

what is the best way or service in IBM Cloud Platform to monitoring and logging Watson services?

I would be interested in extracting information like the response time for each request.

Thanks in advance

g_tech
  • 251
  • 1
  • 4
  • 13

1 Answers1

1

You can retrieve the Watson Assistant chat logs by making REST API call. It contains the request and response timestamp of each input. You would have to probably record Watson API calls in your application to take into account the network latency time to measure overall application response time.

curl -u "apikey:{apikey}" "https://gateway.watsonplatform.net/assistant/api/v1/workspaces/{workspace_id}/logs?version=2017-09-13"

{
  "logs": [
    {
      "request": {
        "input": {
          "text": "Good morning"
        }
      },
      "response": {
        "intents": [
          {
            "intent": "hello",
            "confidence": 1
          }
        ],
        .
        .
        .

      "workspace_id": "{workspace_id}",
      "request_timestamp": "2017-09-13T16:39:56.284Z",
      "response_timestamp": "2017-09-13T16:39:58.828Z",
        .
        .
}
Manoj Singh
  • 1,627
  • 12
  • 21