How to get http headers from event listener spi code

I’m writing an event listener spi that records some custom content of httprequest header, e.g. traceid, etc when some event occurred. Yet while referring to code in JBossLoggingEventListenerProvider as below, I found the value of http headers are always null when I did some operation whether in postman or in keycloak admin console page, e.g. calling token endpoint in postman or login/logout in admin page.
Is there configuration that control the http headers from KeycloakContext? Anyone would help this? thanks in advance.

-----sample snippet in JBossLoggingEventListenerProvider------

private void setKeycloakContext(StringBuilder sb) {
        KeycloakContext context = session.getContext();
        UriInfo uriInfo = context.getUri();
        **HttpHeaders headers = context.getRequestHeaders();**
        if (uriInfo != null) {
            sb.append(", requestUri=");

        if (headers != null) {
            sb.append(", cookies=[");
            boolean f = true;
            for (Map.Entry<String, Cookie> e : headers.getCookies().entrySet()) {
                if (f) {
                    f = false;
                } else {
                    sb.append(", ");

-------here is my code-----------

final KeycloakContext context = session.getContext();"CCC-----" + context);

        final HttpHeaders requestHeaders = context.getRequestHeaders();"AAA-----" + requestHeaders);

        String traceId = null;
        String callerContextId = null;

        if(requestHeaders != null){
            final MultivaluedMap<String, String> reqHeader = requestHeaders.getRequestHeaders();
  "111-----" + reqHeader.toString());

            final List<String> reqList = requestHeaders.getRequestHeader(Constants.RequestHeader.TRACE_ID);

            traceId = requestHeaders.getHeaderString(Constants.RequestHeader.TRACE_ID);
            callerContextId = requestHeaders.getHeaderString(Constants.RequestHeader.CONTEXT_ID);

        if (traceId==null || traceId.isEmpty()){
            traceId = generateRandomString(10);
            logger.warn("request header trace_id is empty. Generated random trace_id :" + traceId);