runtimes/core: fix raw endpoint status code in traces (#2489)