Check trace key before adding trace headers to response
Refactor tests for trace key