jitlogic / zorka

Sophisticated monitoring agent for Java

Home Page:http://zorka.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpyFlagsProcessor logic error?

codeno opened this issue · comments

SpyFlagsProcessor.java, function process,
record.put(".STAGES", error
? ((f | SpyLib.ON_ERROR) & ~SpyLib.ON_RETURN)
: ((f | SpyLib.ON_RETURN) & ~SpyLib.ON_ERROR));
Here, ON_ERROR and ON_RETURN are used as bits.

ZorkaStatsCollector.java, function submit,
if (0 != ((Integer) record.get(".STAGES") & (1 << ON_RETURN))) {...
But here ON_ERROR and ON_RETURN are used as offsets.

Nasty bug it was. Fixed in 04af84a.

Thank you.