private void doSendStaticMsg(TcpMsgSender sender) {
        while (!queue.isEmpty()) {
            FileStatic data = queue.poll();
            LOGGER.info("file static detail: {}", data);
            if (sender == null) {
                continue;
            }
            try {
                ProcessResult procResult = new ProcessResult();
                long dataTime = AgentUtils.getCurrentTime();
                byte[] body = data.getFieldsString().getBytes(StandardCharsets.UTF_8);
                if (!sender.sendMessage(new TcpEventInfo(INLONG_AGENT_SYSTEM,
                        INLONG_FILE_STATIC, dataTime, null, body), procResult)) {
                    LOGGER.error("send static failed: ret = {}", procResult);
                    AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_SEND_FAILED, INLONG_AGENT_SYSTEM, INLONG_FILE_STATIC,
                            dataTime, 1, body.length);
                    AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_SEND_FAILED_REAL_TIME, INLONG_AGENT_SYSTEM,
                            INLONG_FILE_STATIC, dataTime, 1, body.length);
                } else {
                    AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_SEND_SUCCESS, INLONG_AGENT_SYSTEM, INLONG_FILE_STATIC,
                            dataTime, 1, body.length);
                    AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_SEND_SUCCESS_REAL_TIME, INLONG_AGENT_SYSTEM,
                            INLONG_FILE_STATIC, dataTime, 1, body.length);
                }
            } catch (Throwable ex) {
                LOGGER.error("send static throw exception", ex);
            }
        }
    }
Collect various indicators of agent processes for backend problem analysis
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/FileStaticManager.java