Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Print the log with the request ID #4450

hung ·

Dear Mr. Robin Shen,
Our team want to set alert when checking condition timeout, so we need to print the log when it occur.
GridTaskFuture.java: public R get(long timeout)
I found that above function only throw exception and not show the log.
Could you please help us modify this function to print the log with the request ID?

Thank you!

  • replies 9
  • views 54
  • stars 0
robinshen ADMIN ·

We can print the request uuid into the log, but its server log instead of build log as build is not generated yet. Is this what you want?

hung ·

Hello Mr. Robin Shen,
Server log is ok.
We want the server will show log with the request id, before throw timeout exception:
throw new TimeoutException("Timed out waiting for task completion.");
Is it ok?

robinshen ADMIN ·

In next patch release, the server log will contain something like this when check build condition times out:

Error processing build request eec1aaaf-4b9e-44cb-aa0f-9353ebf94e85
...
hung ·

Could you make the log unique? I found 2 lines of code in DefaultBuildEngine.java print the server log: Error processing build request
We want it unique to avoid noise when checking timed out event
eg: "Timed out waiting for task completion, request Id: eec1aaaf-4b9e-44cb-aa0f-9353ebf94e85"

robinshen ADMIN ·

They are from different context... Suppressing either one of them will cause some important messages being missed in some cases. You may improve your log analysis logic to filter off messages from duplicating request ids.

hung ·

Ok, please apply the log in next patch release

robinshen ADMIN ·
hung ·

Hello Mr. Robin Shen,
This change has been applied to GridTaskFuture.java file, right?
I cannot find the log.

robinshen ADMIN ·

It was added to DefaultBuildEngine (line 1293). You may test it by specify "check build condition" as a script, and sleep a while in the script to exceed build condition checkout timeout.