runtimes/core: fix raw endpoint status code in metrics (#2477)