private void addToStore(InstanceProfile profile, boolean addNew) {
        LOGGER.info("add instance to instance store state {} instanceId {}", profile.getState(),
                profile.getInstanceId());
        instanceStore.storeInstance(profile);
        if (addNew) {
            String inlongGroupId = profile.getInlongGroupId();
            String inlongStreamId = profile.getInlongStreamId();
            AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_ADD_INSTANCE_DB, inlongGroupId, inlongStreamId,
                    profile.getSinkDataTime(), 1, 1, auditVersion);
        }
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java